You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current Dispose() method stops the worker from polling jobs. But the current implementation uses a background task and does not wait for its termination to return. As a result, it is difficult to know when the worker is effectively stopped.
Our use case is the management of the Docker container termination: when we receive the SIGTERM, we must 1st stop the worker from polling, then wait for all current tasks to finish.
Describe the solution you'd like
We need a clear async method that stops the IJobWorker.
Describe alternatives you've considered
I propose 2 equivalent solutions:
In both cases, the current Dispose() method would call the new async one just to not break the existing behavior.
We may consider marking the Dispose() method as obsolete and remove it later
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The current Dispose() method stops the worker from polling jobs. But the current implementation uses a background task and does not wait for its termination to return. As a result, it is difficult to know when the worker is effectively stopped.
Our use case is the management of the Docker container termination: when we receive the SIGTERM, we must 1st stop the worker from polling, then wait for all current tasks to finish.
Describe the solution you'd like
We need a clear async method that stops the IJobWorker.
Describe alternatives you've considered
I propose 2 equivalent solutions:
In both cases, the current Dispose() method would call the new async one just to not break the existing behavior.
We may consider marking the Dispose() method as obsolete and remove it later
The text was updated successfully, but these errors were encountered: