diff --git a/bookwyrm/templates/settings/celery.html b/bookwyrm/templates/settings/celery.html new file mode 100644 index 000000000..b2bd95601 --- /dev/null +++ b/bookwyrm/templates/settings/celery.html @@ -0,0 +1,109 @@ +{% extends 'settings/layout.html' %} +{% load humanize %} +{% load i18n %} +{% load celery_tags %} + +{% block title %}{% trans "Celery Status" %}{% endblock %} + +{% block header %}{% trans "Celery Status" %}{% endblock %} + +{% block panel %} + +{% if queues %} +
+

{% trans "Queues" %}

+
+
+
+

{% trans "Low priority" %}

+

{{ queues.low_priority|intcomma }}

+
+
+
+
+

{% trans "Medium priority" %}

+

{{ queues.medium_priority|intcomma }}

+
+
+
+
+

{% trans "High priority" %}

+

{{ queues.high_priority|intcomma }}

+
+
+
+
+{% else %} +
+ + + {% trans "Could not connect to Redis broker" %} + +
+ +{% endif %} + +{% if stats %} +
+

{% trans "Active Tasks" %}

+ {% for worker in active_tasks.values %} +
+ + + + + + + + {% if not worker %} + + + + {% endif %} + {% for task in worker %} + + + + + + + {% endfor %} +
{% trans "ID" %}{% trans "Task name" %}{% trans "Run time" %}{% trans "Priority" %}
+ {% trans "No active tasks" %} +
{{ task.id }}{{ task.name|shortname }}{{ task.time_start|runtime }}{{ task.delivery_info.routing_key }}
+
+ {% endfor %} +
+ +
+

{% trans "Workers" %}

+ + {% for worker_name, worker in stats.items %} +
+

{{ worker_name }}

+ {% trans "Uptime:" %} {{ worker.uptime|uptime }} +
+ {% endfor %} +
+ +{% else %} + +
+ + + {% trans "Could not connect to Celery" %} + +
+{% endif %} + +{% if errors %} +
+

{% trans "Errors" %}

+ {% for error in errors %} +
{{ error }}
+{% endfor %} + +
+{% endif %} + +{% endblock %} diff --git a/bookwyrm/templates/settings/layout.html b/bookwyrm/templates/settings/layout.html index 862de9585..ffb21d4a6 100644 --- a/bookwyrm/templates/settings/layout.html +++ b/bookwyrm/templates/settings/layout.html @@ -74,6 +74,15 @@ {% endif %} + {% if perms.edit_instance_settings %} + + + {% endif %} {% if perms.bookwyrm.edit_instance_settings %}