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

Use non-zero exit codes in the amqp_watch implementation on setup errors #28

Merged
merged 1 commit into from
Sep 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions sir/amqp/handler.py
Expand Up @@ -18,6 +18,7 @@
from retrying import retry
from socket import error as socket_error
from sqlalchemy import and_
from sys import exit
from urllib2 import URLError

__all__ = ["callback_wrapper", "watch", "Handler"]
Expand Down Expand Up @@ -258,10 +259,10 @@ def watch(args):
create_amqp_connection()
except socket_error as e:
logger.error("Couldn't connect to RabbitMQ, check your settings. %s", e)
return
exit(1)

try:
_watch_impl()
except URLError as e:
logger.error("Connecting to Solr failed: %s", e)
return
exit(1)