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

QuartzPeriodicBackgroundWorkerAdapter should add [DisallowConcurrentExecution] #9819

Closed
JadynWong opened this issue Aug 14, 2021 · 4 comments · Fixed by #9821
Closed

QuartzPeriodicBackgroundWorkerAdapter should add [DisallowConcurrentExecution] #9819

JadynWong opened this issue Aug 14, 2021 · 4 comments · Fixed by #9821

Comments

@JadynWong
Copy link
Contributor

JadynWong commented Aug 14, 2021

abp 4.4.0 / mvc

Volo.Abp.BackgroundWorkers.Quartz

QuartzPeriodicBackgroundWorkerAdapter should use the [DisallowConcurrentExecution] attribute to prevent concurrent execution.

This is useful in multi-instance environment.

Also same for Volo.Abp.BackgroundJobs.Quartz.QuartzJobExecutionAdapter.

@JadynWong JadynWong changed the title QuartzJobExecutionAdapter should add [DisallowConcurrentExecution] QuartzPeriodicBackgroundWorkerAdapter should add [DisallowConcurrentExecution] Aug 14, 2021
@realLiangshiwei realLiangshiwei self-assigned this Aug 15, 2021
@realLiangshiwei
Copy link
Member

Thanks for your idea. we should add this.

@maliming
Copy link
Member

I think it's best that we should not configure it but allow developers to configure it.

@JadynWong
Copy link
Contributor Author

As I known Quartz.Net does not have a direct API to do this.

Two adapters may be needed, one without special attributes as default, and one with DisallowConcurrentExecution aattribute.
Use different adapters according to the options,
or even use user-defined adapters according to the worker type.

@realLiangshiwei
Copy link
Member

We don't need to use DisallowConcurrentExecution for QuartzJobExecutionAdapter, because they are all different job keys and only executed once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants