Skip to content

Commit

Permalink
close db after test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Rost committed Jul 20, 2024
1 parent 5a608e4 commit d78ff8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ if ( isDebug && process.argv[3]?.startsWith( '--timeout:' ) ) {
setTimeout( () => {
console.log( `\n- Running for ${timeout} seconds, closing process!\n` );
isDebug = false;
graceful('SIGTERM');
manager.shards.filter( shard => shard.process && !shard.process.killed ).forEach( shard => shard.kill() );
if ( typeof server !== 'undefined' && !server.killed ) server.kill();
}, timeout * 1_000 ).unref();
Expand Down

0 comments on commit d78ff8d

Please sign in to comment.