added cli-covarage tool and fixed more tests
This commit is contained in:
parent
b63e58784c
commit
b845a8eade
57 changed files with 11917 additions and 295 deletions
|
|
@ -90,8 +90,8 @@ export class Shutdown {
|
|||
* Set shutdown timeout in milliseconds
|
||||
*/
|
||||
setTimeout(timeout: number): void {
|
||||
if (timeout <= 0) {
|
||||
throw new Error('Shutdown timeout must be positive');
|
||||
if (isNaN(timeout) || timeout <= 0) {
|
||||
throw new Error('Shutdown timeout must be a positive number');
|
||||
}
|
||||
this.shutdownTimeout = timeout;
|
||||
}
|
||||
|
|
@ -107,7 +107,8 @@ export class Shutdown {
|
|||
* Check if shutdown signal was received (for quick checks in running jobs)
|
||||
*/
|
||||
isShutdownSignalReceived(): boolean {
|
||||
return this.signalReceived || this.isShuttingDown;
|
||||
const globalFlag = (globalThis as any).__SHUTDOWN_SIGNAL_RECEIVED__ || false;
|
||||
return globalFlag || this.signalReceived || this.isShuttingDown;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue