mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 17:15:17 +00:00
support comma-separated queue lists for backward compatability (spaces are still supported) (#4937)
This commit is contained in:
parent
100c7be5e0
commit
d38d3b6b4d
@ -2,6 +2,7 @@ from __future__ import absolute_import
|
|||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import datetime
|
import datetime
|
||||||
|
from itertools import chain
|
||||||
|
|
||||||
from click import argument
|
from click import argument
|
||||||
from flask.cli import AppGroup
|
from flask.cli import AppGroup
|
||||||
@ -40,6 +41,8 @@ def worker(queues):
|
|||||||
|
|
||||||
if not queues:
|
if not queues:
|
||||||
queues = default_queues
|
queues = default_queues
|
||||||
|
else:
|
||||||
|
queues = chain(*[queue.split(",") for queue in queues])
|
||||||
|
|
||||||
with Connection(rq_redis_connection):
|
with Connection(rq_redis_connection):
|
||||||
w = Worker(queues, log_job_description=False, job_monitoring_interval=5)
|
w = Worker(queues, log_job_description=False, job_monitoring_interval=5)
|
||||||
|
Loading…
Reference in New Issue
Block a user