|
|
@ -9,7 +9,7 @@ import click
|
|
|
|
from functools import partial
|
|
|
|
from functools import partial
|
|
|
|
|
|
|
|
|
|
|
|
from redis.exceptions import ConnectionError
|
|
|
|
from redis.exceptions import ConnectionError
|
|
|
|
from rq import Queue, Worker, use_connection
|
|
|
|
from rq import Queue, Worker, Connection
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
red = partial(click.style, fg='red')
|
|
|
|
red = partial(click.style, fg='red')
|
|
|
@ -163,7 +163,6 @@ def info(ctx, path, interval, raw, only_queues, only_workers, by_queue, queues):
|
|
|
|
sys.path = path.split(':') + sys.path
|
|
|
|
sys.path = path.split(':') + sys.path
|
|
|
|
|
|
|
|
|
|
|
|
conn = ctx.obj['connection']
|
|
|
|
conn = ctx.obj['connection']
|
|
|
|
use_connection(conn)
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if only_queues:
|
|
|
|
if only_queues:
|
|
|
|
func = show_queues
|
|
|
|
func = show_queues
|
|
|
@ -172,6 +171,7 @@ def info(ctx, path, interval, raw, only_queues, only_workers, by_queue, queues):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
func = show_both
|
|
|
|
func = show_both
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with Connection(conn):
|
|
|
|
refresh(interval, func, queues, raw, by_queue)
|
|
|
|
refresh(interval, func, queues, raw, by_queue)
|
|
|
|
except ConnectionError as e:
|
|
|
|
except ConnectionError as e:
|
|
|
|
click.echo(e)
|
|
|
|
click.echo(e)
|
|
|
|