diff --git a/rq_dashboard/templates/rq_dashboard/jobs.html b/rq_dashboard/templates/rq_dashboard/jobs.html index 824bbe3..2711597 100644 --- a/rq_dashboard/templates/rq_dashboard/jobs.html +++ b/rq_dashboard/templates/rq_dashboard/jobs.html @@ -19,11 +19,13 @@ + +

diff --git a/rq_dashboard/templates/rq_dashboard/queues.html b/rq_dashboard/templates/rq_dashboard/queues.html index fd50209..5af33f1 100644 --- a/rq_dashboard/templates/rq_dashboard/queues.html +++ b/rq_dashboard/templates/rq_dashboard/queues.html @@ -14,9 +14,11 @@

Queues

Queue Queued jobs Deferred jobs + Scheduled jobs Started jobs Finished jobs Failed jobs + Canceled jobs @@ -32,9 +34,11 @@

Queues

<%= d.name %> <%= d.count %> <%= d.deferred_job_registry_count %> + <%= d.scheduled_job_registry_count %> <%= d.started_job_registry_count %> <%= d.finished_job_registry_count %> <%= d.failed_job_registry_count %> + <%= d.canceled_job_registry_count %> diff --git a/rq_dashboard/version.py b/rq_dashboard/version.py index dfbedfa..369c38e 100644 --- a/rq_dashboard/version.py +++ b/rq_dashboard/version.py @@ -1 +1 @@ -VERSION = "0.6.7" +VERSION = "0.6.7.2" diff --git a/rq_dashboard/web.py b/rq_dashboard/web.py index 07ce2a8..97d347c 100644 --- a/rq_dashboard/web.py +++ b/rq_dashboard/web.py @@ -47,6 +47,9 @@ FailedJobRegistry, FinishedJobRegistry, StartedJobRegistry, + ScheduledJobRegistry, + CanceledJobRegistry, + ) from six import string_types @@ -160,6 +163,24 @@ def serialize_queues(instance_number, queues): per_page="8", page="1", ), + canceled_job_registry_count=CanceledJobRegistry(q.name).count, + canceled_url=url_for( + ".jobs_overview", + instance_number=instance_number, + queue_name=q.name, + registry_name="canceled", + per_page="8", + page="1", + ), + scheduled_job_registry_count=ScheduledJobRegistry(q.name).count, + scheduled_url=url_for( + ".jobs_overview", + instance_number=instance_number, + queue_name=q.name, + registry_name="scheduled", + per_page="8", + page="1", + ), ) for q in queues ] @@ -232,6 +253,10 @@ def get_queue_registry_jobs_count(queue_name, registry_name, offset, per_page): current_queue = StartedJobRegistry(queue_name) elif registry_name == "finished": current_queue = FinishedJobRegistry(queue_name) + elif registry_name == "scheduled": + current_queue = ScheduledJobRegistry(queue_name) + elif registry_name == "canceled": + current_queue = CanceledJobRegistry(queue_name) else: current_queue = queue total_items = current_queue.count @@ -410,6 +435,14 @@ def empty_queue(queue_name, registry_name): ids = FinishedJobRegistry(queue_name).get_job_ids() for id in ids: delete_job_view(id) + elif registry_name == "canceled": + ids = CanceledJobRegistry(queue_name).get_job_ids() + for id in ids: + delete_job_view(id) + elif registry_name == "scheduled": + ids = ScheduledJobRegistry(queue_name).get_job_ids() + for id in ids: + delete_job_view(id) return dict(status="OK") diff --git a/version.json b/version.json index 11708e0..b824389 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{ "version": "0.6.7" } +{ "version": "0.6.7.2" }