Skip to content

Commit

Permalink
chore: Update .gitignore and queue.js
Browse files Browse the repository at this point in the history
The .gitignore file was updated to include the "alive" file. Additionally, the queue.js file was modified to handle process kill events and added an event listener for uncaught exceptions.
  • Loading branch information
guillecro committed Jun 11, 2024
1 parent 1b3be37 commit 8779da4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ docker-compose.yaml

/tmp

run-dev.sh
run-dev.sh
alive
6 changes: 3 additions & 3 deletions queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ setInterval(() => {
fs.writeFileSync(path.join(__dirname, 'alive'), '0');
}, 5 * 1000);

// on process kill of some reason, stop agenda
process.on('SIGTERM', graceful);
process.on('SIGINT', graceful);

// on process kill, stop agenda
process.on('exit', graceful);
process.on('beforeExit', graceful);
process.on('beforeExit', graceful);
process.on('uncaughtException', graceful);

0 comments on commit 8779da4

Please sign in to comment.