Closed MarkAlvinReyes closed 7 months ago
thnks for the sample, I can repro the issue and will see to it. For now I was able to open ME by installing latest System.Interactive 6.0.1 to the Blazor.Server project and then restart VS.
Thanks, apobekiaris! Please let me know when the fix for this will be available so that I can apply to my project.
apobekiaris i tried to add the System.Interactive 6.0.1 to the Blazor.Server project but there was an error, See the attached image.
I do not think this error relates to eXpandFramework, it says the dir does not exist, so u probably uninstall DX. YOu can configure these dirs in your VS/Tools/Options/Nuget/Package Sources
Thank you! issue was fixed after configuring the Nuget package sources. Just a follow-up question, how to create the objectspace in my class that has the JobProvider attribute? See the attached recording. As you can see the value of the Application property is NULL so I was not able to create objectspace. It was NULL because the constructor that has the BlazorApplication parameter was not being called. Is there any code i'm missing in order to call the constructor of my class?
see the wiki for instructions on how to declare jobs
apobekiaris,
I have tried the code in your example but where i will get the ServiceProvider in the DailyTask method? By the way I changed the DailyTask method name to ProcessSegmentation. See the attached screenshot. Because when i try to use the ServiceProvider .RunWithStorageAsync is says that ServiceProvider does not contain a definition for 'RunWithStorageAsync. What is the namespace of the ServiceProvider that you used in the sample code?
the ServiceProvider
is the Provider
docs are wrong I will update them
Same with this example from here: https://www.youtube.com/watch?v=0LJ2bM1CfMg the Application property is NULL so there is no way you can create an objectspace. See the attached video recording. Even if I changed the property to Provider same as in my previous images the value of this property is also NULL.
this video uses an old version it is not possible to inject the BlazorApplication, instead there is the IServiceProvider. There are several u can follow or also u can llok at the TestApplication
Thank you apobekiaris! The initialization of the ServiceProvider is now working. I just need to add the [ActivatorUtilitiesConstructor] attribute in the constructor with the ServiceProvider parameter. Now, when you click the Trigger button to execute the job, it will execute the code that I added. The problem now is after executing the job and then clicking the Refresh button there are no data shown in the Workers tab. See the attached video recording NoDataInWorkersTab.mp4. Is there anything I need to do to display the data in the Workers tab? In your example in Step 7 see the attached screenshot ObserveJobState.png is this the code that I need to add in order to display the data in the Workers tab? Where I will add this code?
I recommend you either use the distributed symbols to actually debug the package and see what's wrong or another option is to compile the source using the quick you can read more on how easy it is to own the code at https://github.com/eXpandFramework/eXpand/issues/943
as you can read after u build the source u can simply load the JobScheduler project in your solution or any other package and build. If you set a breakpoint it will break or u can even modify it. Sorry I cannot repeat myself again all the info you need to master this framework is on #943
about 7
public static IObservable<JobState> JobState => JobStateSubject.AsObservable();
thats the declaration of JobState so it is static so feel free to use it any place and remember to dispose it along with the container the same u do with any IDisposabel class or events etc
Where does the data in the Workers tab came from? Or how it was generated? Is there any code that I need to add in order to display the data in the Workers tab?
without a sample and spending time to research why u cannot see the Worker is not possible to answer u. In any case the worker is created at JobSchedulerService.ApplyJobState which is called from the Hangfire filter and since u go into your job I assume it went there. I would check if the worker is on my DB or I would debug the package as I mentioned
the package as all the packages work as is or there will be explicit instructions in the wiki. In this case no instruction so as it is
did you run the TestApplication from the source code? does it work there?
Actually, i tried this one https://github.com/eXpandFramework/Reactive.XAF/blob/master/src/Tests/EasyTests/TestApplication/TestApplication.Module.Blazor/JobScheduler/Job.cs copy all the codes then execute the job. When i check the Hangfire.State table in the database there are records there but no data is displayed in the workers' tab.
thnks I need time to review the testapplication apparently this is some kind of layout issue, data are there so they should be displayed unless the layout is broken. In the meantime feel free to open ME and play with the layout your self.
And one thing apobekiaris maybe you can also check this one, every time I run my application and there is a job that runs Minutely I always get this error. See the attached screenshot.
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.
I already upgraded my project to DevExpress version 22.1.6 but I have an error loading the Model.DesignedDiffs.xafml and model.xafml after adding the following packages (Xpand.Xaf.Modules.Reactive, Xpand.XAF.Modules.JobScheduler.Hangfire and Xpand.XAF.Modules.Blazor) to my MySampleHangfire.Blazor.Server and MySampleHangfire.Module project. See the attached screenshot. I also attach here my sample project.
The error occurred after adding the below code in the constructor of the BlazorModule.cs file.
RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.Blazor.BlazorModule)); RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.Reactive.ReactiveModule)); RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.JobScheduler.Hangfire.JobSchedulerModule));
MySampleHangfire.zip
You can check the link below for the video recording I made to reproduce the issue.
https://supportcenter.devexpress.com/ticket/details/t1126554/how-to-add-model-assembly-job-source (Filename: ErrorExpandHangFire.mp4)