Adds support for awaiting all running tasks when a sigint/sigterm handler is received.
Note that Unregister (internally calling Unsubscribe) is called as early as possible - there need to be some small changes to the Hatchet engine so that we track a shutdown state on the workers, so that new tasks stop being assigned but old tasks continue to be assigned to the worker.
Adds support for awaiting all running tasks when a sigint/sigterm handler is received.
Note that
Unregister
(internally callingUnsubscribe
) is called as early as possible - there need to be some small changes to the Hatchet engine so that we track a shutdown state on the workers, so that new tasks stop being assigned but old tasks continue to be assigned to the worker.