fixed up qm tasks and shutdown sequence
This commit is contained in:
parent
5929612e36
commit
1bb2380a28
4 changed files with 37 additions and 7 deletions
|
|
@ -70,6 +70,15 @@ export function isShuttingDown(): boolean {
|
|||
return globalInstance?.isShutdownInProgress() || false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if shutdown signal was received (for quick checks in running jobs)
|
||||
*/
|
||||
export function isShutdownSignalReceived(): boolean {
|
||||
const globalFlag = globalThis.__SHUTDOWN_SIGNAL_RECEIVED__ || false;
|
||||
const instanceFlag = globalInstance?.isShutdownSignalReceived() || false;
|
||||
return globalFlag || instanceFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of registered shutdown callbacks
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue