From 7a8fe6be30258742d205d9844f66364a67008323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Reni=C3=A9?= Date: Sat, 16 Mar 2013 10:41:14 +0100 Subject: [PATCH] Ability to get SENTRY_DSN from the environment variables --- rq/scripts/rqworker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rq/scripts/rqworker.py b/rq/scripts/rqworker.py index 2e004949..19073eab 100755 --- a/rq/scripts/rqworker.py +++ b/rq/scripts/rqworker.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +import os import sys import argparse import logging @@ -45,7 +46,8 @@ def main(): # Other default arguments if args.sentry_dsn is None: - args.sentry_dsn = settings.get('SENTRY_DSN', None) + args.sentry_dsn = settings.get('SENTRY_DSN', + os.environ.get('SENTRY_DSN', None)) if args.verbose and args.quiet: raise RuntimeError("Flags --verbose and --quiet are mutually exclusive.")