New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get the Id of a Scheduled Job (IBackgroundJobManager/IBackgroundJobStore) #2645
Comments
Currently, the only option is to directly use Hangfire API. |
Closed by #2650 |
can you please provide me code that how i can use hangefire jobs in abp |
thanks i already have this ,but i want to confirm where i should create jobs in web.Core or in .application and from where i call these Background job ? |
There is no rule on which layer to put in. You can put it in the application or core layer. It can also be called anywhere. But I feel that I should not put it in the web-related layer. |
I am currently scheduling jobs from the AppService layer using IBackgroundJobManager and IBackgroundJobStore. I integrated my app with Hangfire and the integration works. When scheduling a job I see it in the Hangfire Dashboard and DB. However, when calling EnqueueAsync, I would like to get the JobId which was scheduled. This is something I could do if I was using Hangfire directly. I would use that Id to later query for it and check its status. Right now I have no ways to do that since EnqueueAsync does not give me the JobId.
How can I get the JobId at the time I schedule using IBackgroundJobManager and IBackgroundJobStore? How can I query by JobId? This needs to be done in the AppService layer.
Thank you,
Martin
The text was updated successfully, but these errors were encountered: