Skip to content
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

Trigger jobs that respects concurrency config #52

Closed
KorsG opened this issue May 14, 2024 · 3 comments · Fixed by #55
Closed

Trigger jobs that respects concurrency config #52

KorsG opened this issue May 14, 2024 · 3 comments · Fixed by #55
Labels
bug Something isn't working

Comments

@KorsG
Copy link

KorsG commented May 14, 2024

Is your feature request related to a problem? Please describe.
I was playing around with the library as a light-weight alternative to Hangfire, but we often need to trigger scheduled jobs manually via UI/API which should respect the concurrency configuration of the jobs being triggered, but as far as I can tell it is not possible since instant jobs does not check concurrency config.

Describe the solution you'd like
A way to trigger jobs that respects the concurrency config of the job. I actually thought the instants jobs would respect the concurrency config as it is, but I can also see the need to trigger a job that runs regardless. Maybe change the "RunScheduledJob" methods on the IInstantJobRegistry to respects the concurrency config by default and then RunInstantJob should just execute immediately as it is now, because the name implies it.
Otherwise via another API that signals intent more clearly and does not cause breaking changes - e.g. IJobRegistry.TriggerScheduledJob(...) 😊

Describe alternatives you've considered
None

Additional context
None

@linkdotnet
Copy link
Member

That is a good point and yes indeed currently it "by-passes" the whole approach.
We are aware of that shortcoming and we will address it.

Thanks for the report @KorsG

@linkdotnet linkdotnet added the bug Something isn't working label May 14, 2024
@KorsG
Copy link
Author

KorsG commented May 14, 2024

Sounds good and thanks for looking into it 😊

@linkdotnet linkdotnet mentioned this issue May 15, 2024
4 tasks
This was linked to pull requests May 15, 2024
@linkdotnet
Copy link
Member

Hey @KorsG - if you use any version higher than 2.4.1-preview, then the issue should be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants