diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/worker.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/worker.py b/scripts/worker.py index 4077ad1..fee4ec8 100644 --- a/scripts/worker.py +++ b/scripts/worker.py @@ -10,6 +10,7 @@ from tempfile import TemporaryFile from redis import Redis from qc_app import jobs +from qc_app.check_connections import check_redis def parse_args(): "Parse the command-line arguments" @@ -21,11 +22,7 @@ def parse_args(): parser.add_argument("job_id", help="The id of the job being processed") args = parser.parse_args() - try: - conn = Redis.from_url(args.redisurl) # pylint: disable=[unused-variable] - except ConnectionError as conn_err: # pylint: disable=[unused-variable] - print(traceback.format_exc(), file=sys.stderr) - sys.exit(1) + check_redis(args.redisurl) return args |