Commits

Donald Stufft committed c4aaab9

Handle the case where there is no Queue

  • Participants
  • Parent commits 48dee2e

Comments (0)

Files changed (1)

             self.sentry_client = raven.Client(self.config.sentry_dsn)
         if self.config.redis_url:
             self.redis = redis.Redis.from_url(self.config.redis_url)
+
+            # Queue to handle asynchronous tasks
+            self.queue = rq.Queue(connection=self.redis)
         else:
             self.redis = None
+            self.queue = None
         self.env = env
         self.nav_current = None
         self.privkey = None
         self.usercookie = None
         self.failed = None # error message if initialization already produced a failure
 
-        # Queue to handle asynchronous tasks
-        self.queue = rq.Queue(connection=self.redis)
-
         # XMLRPC request or not?
         if self.env.get('CONTENT_TYPE') != 'text/xml':
             fs = cgi.FieldStorage(fp=handler.rfile, environ=env)