Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add stop() call to gracefully exit the bot #42

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

gconklin
Copy link
Contributor

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()

@fbradyirl fbradyirl merged commit 096ba8f into fbradyirl:main Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants