eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
222 stars 115 forks source link

Job Scheduler no logged Job execution - Workers grid is empty #992

Closed ekuziel closed 8 months ago

ekuziel commented 1 year ago

𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻 Hi, I registered Reactive.XAF Job Scheduler module with Hangfire in application. After run of registered Job - the action has been executed succesfully and working as expected, but no data in workers grid occured, data in Hangfire table are populated but not in dbo.JobState and dbo.JobWorker.

Am I missing some configuration related to that XAF module ? Do you have some sample project with Reactive XAF modules ?

Hangfire configuration: services.AddHangfire(configuration => configuration .UseSimpleAssemblyNameTypeSerializer() .UseRecommendedSerializerSettings() .UseSqlServerStorage(connectionString) );

Ractive XAF version 22.5, DevExpress XAF 22.5

apobekiaris commented 1 year ago

in general u do not need to configure hangfire to default as you already used this (i guess)

[assembly: HostingStartup(typeof(HangfireStartup))]
 [assembly: HostingStartup(typeof(HostingStartup))]
 [assembly:HostingStartup(typeof(Xpand.XAF.Modules.Blazor.BlazorStartup))]

they configure hangfire, the rest of the integration is done from Xaf so you need the JobScheduler module as well in the RequiredModuleTypes collection

ekuziel commented 1 year ago

Thanks for a response Apostolis, I tried to configure only [assembly attributes which you mentioned. It doesn't work. I created simple sample, where I got:

  1. issue which I mentioned above - when I triggered any Job - the workers table is empty - and i added services.AddHangfire and services.AddHangfireServer into startup.cs
  2. when I have no database - I need to run the application twice - Hangfire schema is not created after first run, but on second run -> I didn't check for now

Let me know

XpandJobServerTest.zip

apobekiaris commented 1 year ago

I am now working on another JobScheduler issue so I can verify that workers are created with this sample https://github.com/eXpandFramework/eXpand/issues/988#issuecomment-1516045038

can u test it ?

ekuziel commented 1 year ago

hi Apostolis, validated source from #988 -> hangfire schema wasn't created after first run (set to SQL server db instead localdb), in solution is: GlobalConfiguration.Configuration.UseMemoryStorage(); I changed it to var hangConnectionString = Configuration.GetConnectionString("HangFireConnectionString"); GlobalConfiguration.Configuration.UseSqlServerStorage(hangConnectionString);

XpandJobServerTest_workerclick

apobekiaris commented 1 year ago

looks like the view is configured for MasterDetailMode = ListViewAndDetailView u can change it on your side until there is a fix

apobekiaris commented 1 year ago

this case is also fixed in the next minor

expand commented 1 year ago

The pre-release 4.222.11.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.222.13
Xpand.Extensions.Blazor v.4.222.13
Xpand.Extensions.Mono.Cecil v.4.222.13
Xpand.Extensions.Office.Cloud v.4.222.13
Xpand.Extensions.Office.Cloud.Google.Blazor v.4.222.13
Xpand.Extensions.Reactive v.4.222.13
Xpand.Extensions.XAF v.4.222.13
Xpand.Extensions.XAF.Xpo v.4.222.13
Xpand.TestsLib v.4.222.13
Xpand.TestsLib.Blazor v.4.222.13
Xpand.TestsLib.Common v.4.222.13
Xpand.TestsLib.EasyTest v.4.222.13
Xpand.VersionConverter v.4.222.13
Xpand.XAF.Core.All v.4.222.13
Xpand.XAF.Modules.AutoCommit v.4.222.13
Xpand.XAF.Modules.Blazor v.4.222.13
Xpand.XAF.Modules.BulkObjectUpdate v.4.222.13
Xpand.XAF.Modules.CloneMemberValue v.4.222.13
Xpand.XAF.Modules.CloneModelView v.4.222.13
Xpand.XAF.Modules.Email v.4.222.13
Xpand.XAF.Modules.GridListEditor v.4.222.13
Xpand.XAF.Modules.HideToolBar v.4.222.13
Xpand.XAF.Modules.JobScheduler.Hangfire v.4.222.13
Xpand.XAF.Modules.JobScheduler.Notification v.4.222.13
Xpand.XAF.Modules.MasterDetail v.4.222.13
Xpand.XAF.Modules.ModelMapper v.4.222.13
Xpand.XAF.Modules.ModelViewInheritance v.4.222.13
Xpand.XAF.Modules.Office.Cloud.Google v.4.222.13
Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.222.13
Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.222.13
Xpand.XAF.Modules.Office.DocumentStyleManager v.4.222.13
Xpand.XAF.Modules.OneView v.4.222.13
Xpand.XAF.Modules.PositionInListView v.4.222.13
Xpand.XAF.Modules.ProgressBarViewItem v.4.222.13
Xpand.XAF.Modules.RazorView v.4.222.13
Xpand.XAF.Modules.Reactive v.4.222.13
Xpand.XAF.Modules.Reactive.Logger v.4.222.13
Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.222.13
Xpand.XAF.Modules.Reactive.Logger.Hub v.4.222.13
Xpand.XAF.Modules.Reactive.Rest v.4.222.13
Xpand.XAF.Modules.RefreshView v.4.222.13
Xpand.XAF.Modules.SequenceGenerator v.4.222.13
Xpand.XAF.Modules.Speech v.4.222.13
Xpand.XAF.Modules.SpellChecker v.4.222.13
Xpand.XAF.Modules.StoreToDisk v.4.222.13
Xpand.XAF.Modules.SuppressConfirmation v.4.222.13
Xpand.XAF.Modules.TenantManager v.4.222.13
Xpand.XAF.Modules.ViewEditMode v.4.222.13
Xpand.XAF.Modules.ViewItemValue v.4.222.13
Xpand.XAF.Modules.ViewWizard v.4.222.13
Xpand.XAF.Modules.Windows v.4.222.13
Xpand.XAF.Web.All v.4.222.13
Xpand.XAF.Win.All v.4.222.13

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

expand commented 8 months ago

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.