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 graceful exit support to listen_mo_messages command #13

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

tobiasmcnulty
Copy link
Member

@tobiasmcnulty tobiasmcnulty commented Dec 19, 2022

Still works for smpp_client:

$ python manage.py smpp_client foo
2022-12-19 23:06:46,412 smpp_gateway.queries INFO     Waiting for notifications on channel 'foo'
2022-12-19 23:06:46,413 smpp.Client.140545233456720 INFO     Connecting to 1.2.3.4:2775...
2022-12-19 23:06:46,416 smpp.Client.140545233456720 INFO     Entering main listen loop
^C2022-12-19 23:06:53,511 smpp_gateway.utils   INFO     Got signal 2, setting exit_signal_received = True

2022-12-19 23:06:56,433 smpp.Client.140545233456720 INFO     Got exit signal, leaving listen loop
2022-12-19 23:06:56,433 smpp.Client.140545233456720 INFO     Unbinding...
2022-12-19 23:06:56,435 smpp.Client.140545233456720 INFO     Disconnecting...

Also works for listen_mo_messages:

$ python manage.py listen_mo_messages
2022-12-19 23:07:04,345 smpp_gateway.queries INFO     Waiting for notifications on channel 'new_mo_msg'
^C2022-12-19 23:07:07,244 smpp_gateway.utils   INFO     Got signal 2, setting exit_signal_received = True
2022-12-19 23:07:09,347 smpp_gateway.subscribers INFO     Received exit signal, leaving listen loop...

Copy link
Contributor

@Jdsleppy Jdsleppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@tobiasmcnulty tobiasmcnulty merged commit f7a893e into main Dec 20, 2022
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