-
Notifications
You must be signed in to change notification settings - Fork 19
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
Exception when shutting down an asp.net core website #25
Comments
Oh, it seems that this is simply because the cancellationToken requests a cancellation that RavenJobStore.SetSchedulerState throws an exception when LoadAsync is called with the token. Maybe a solution would be to avoid using this token in some terminal states like Paused and Shutdown? |
The problem is that we need to cancel ongoing requests. |
In the case of my server shutdown, my intent is not to stop instantly. The intent is to let the ongoing jobs finish their tasks or interrupt them gracefully (when Quartz is configured that way). So Quartz is waiting for the jobs to finish but the RavenDb store on its side is more in a hurry to interrupt any databse operation.
Maybe use another token with a reasonable timeout? |
Would this be something that you can provide a PR for? |
I use this package with an injected store thanks to UseRavenDbWithInjectedDocumentStore in an asp.net core 6 project.
When shutting down, I get these traces:
It hangs there, then this is displayed:
Any idea @ayende ? Could it be that the access to the RavenDb database has closed first and that the RavenDb Quartz store can not communicate anymore? If yes, how to ensure that the db closes after quartz has done its things?
The text was updated successfully, but these errors were encountered: