Created
September 25, 2018 10:07
-
-
Save hmpmarketing/78fd32d8b5cd47da7ae4271e0c76ff73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function handleSignals(){ | |
| helpers.log(p_id,`------------SIGINT Detected1!-------------`); | |
| helpers.log(p_id,`------------SIGINT Detected2!-------------`); | |
| req.post(`${webdomain}/api/p_id/end/${p_id}`, {form:{error:'',msg:'SIGINT DETECTED!'}}, function(err, res, body) { | |
| helpers.log(p_id,`------------SIGINT Detected3!-------------`); | |
| }); | |
| helpers.log(p_id,`------------SIGINT Detected4!-------------`); | |
| } | |
| process.on('SIGINT', handleSignals) | |
| process.on('SIGTERM', handleSignals) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment