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

Xpand.XAF.Modules.JobScheduler.Hangfire - context.JobId() desn't giving the persistent job id #926

Closed dixboss closed 10 months ago

dixboss commented 2 years ago

context.JobId() doesn't give the persistent job id but a Hangfire.Server.PerformContext JobId in GUI.

[JobProvider] public async Task ImportTask(PerformContext context) { var jobId = context.JobId(); // I'm getting a GUI ID }

apobekiaris commented 2 years ago

see

Use a Job descendant to pass job specific parameter

https://github.com/eXpandFramework/Reactive.XAF/tree/master/src/Modules/JobScheduler.Hangfire

dixboss commented 2 years ago

context.JobId() is giving a CS0012 error with IStorageConnection of Hangfire.Core" Version="1.7.24" I'm trying to get the Id by:

var jobId = context.Connection.GetRecurringJobs().FirstOrDefault(id => id.LastJobState == "Processing")?.Id;

expand commented 10 months ago

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

.Thank you for your contribution.