Skip to content

Commit

Permalink
Merge pull request #784 from 18F/add_exit_signal_logging
Browse files Browse the repository at this point in the history
Log when the process receives and exit signal
  • Loading branch information
XavierMetichecchia authored Feb 8, 2024
2 parents 1e93efb + 2503cac commit e38a5a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deploy/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ const runScriptWithLogName = (scriptPath, scriptLoggingName) => {
console.log(data.toString().trim())
});

childProcess.on("exit", (code) => {
childProcess.on("exit", (code, signal) => {
logger.info(`${scriptLoggingName} exitted with code: ${code}`);
if (signal) {
logger.info(`${scriptLoggingName} received signal: ${signal}`);
}
});
}

Expand Down

0 comments on commit e38a5a3

Please sign in to comment.