Last active
November 21, 2021 09:11
-
-
Save slavafomin/1a2731137164fa2d2fb7851a9c28477a to your computer and use it in GitHub Desktop.
Grammy Runner Graceful Shutdown
This file contains 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
const runner = run(bot); | |
['SIGTERM', 'SIGINT'].forEach(signal => | |
process.once(signal, () => runner.isRunning() && runner.stop()) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment