restore environment-based queue names
This commit is contained in:
@@ -98,6 +98,7 @@ def map_config(config):
|
||||
"default", "PERMANENT_SESSION_LIFETIME"
|
||||
),
|
||||
"RQ_REDIS_URL": config["default"]["REDIS_URI"],
|
||||
"RQ_QUEUES": ["atat_{}".format(ENV.lower())],
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,11 +24,13 @@ class ATSTQueue(RQ):
|
||||
def _queue_job(self, function, *args, **kwargs):
|
||||
self.get_queue().enqueue(function, *args, **kwargs)
|
||||
|
||||
# pylint: disable=pointless-string-statement
|
||||
"""Instance methods to queue up application-specific jobs."""
|
||||
|
||||
def send_mail(self, to, subject, body):
|
||||
self._queue_job(ATSTQueue._send_mail, to, subject, body)
|
||||
|
||||
# pylint: disable=pointless-string-statement
|
||||
"""Class methods to actually perform the work.
|
||||
|
||||
Must be a class method (or a module-level function) because we being able
|
||||
|
||||
Reference in New Issue
Block a user