webex_bot
webex_bot copied to clipboard
add stop() call to gracefully exit the bot
when using the bot framework in a service, I needed a way to gracefully stop the process loop from an external trigger.
bot = WebexBot(...)
def graceful_exit()
cysystemd.daemon.notify(cysystemd.daemon.Notification.STOPPING)
bot.stop()
signal.signal(signal.SIGTERM, graceful_exit)
bot.run()