2022-09-15 01:57:08 +00:00
|
|
|
{% 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 %}
|
|
|
|
|
2022-09-15 17:42:27 +00:00
|
|
|
{% if queues %}
|
2022-09-15 01:57:08 +00:00
|
|
|
<section class="block content">
|
2022-09-15 17:42:27 +00:00
|
|
|
<h2>{% trans "Queues" %}</h2>
|
|
|
|
<div class="columns has-text-centered">
|
2023-01-26 15:52:37 +00:00
|
|
|
<div class="column is-3">
|
2022-09-15 17:42:27 +00:00
|
|
|
<div class="notification">
|
|
|
|
<p class="header">{% trans "Low priority" %}</p>
|
|
|
|
<p class="title is-5">{{ queues.low_priority|intcomma }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-26 15:52:37 +00:00
|
|
|
<div class="column is-3">
|
2022-09-15 17:42:27 +00:00
|
|
|
<div class="notification">
|
|
|
|
<p class="header">{% trans "Medium priority" %}</p>
|
|
|
|
<p class="title is-5">{{ queues.medium_priority|intcomma }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-26 15:52:37 +00:00
|
|
|
<div class="column is-3">
|
2022-09-15 17:42:27 +00:00
|
|
|
<div class="notification">
|
|
|
|
<p class="header">{% trans "High priority" %}</p>
|
|
|
|
<p class="title is-5">{{ queues.high_priority|intcomma }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-26 15:52:37 +00:00
|
|
|
<div class="column is-3">
|
|
|
|
<div class="notification">
|
|
|
|
<p class="header">{% trans "Imports" %}</p>
|
|
|
|
<p class="title is-5">{{ queues.imports|intcomma }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-09-15 01:57:08 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
2022-09-15 17:42:27 +00:00
|
|
|
{% else %}
|
|
|
|
<div class="notification is-danger is-flex is-align-items-start">
|
|
|
|
<span class="icon icon-warning is-size-4 pr-3" aria-hidden="true"></span>
|
|
|
|
<span>
|
|
|
|
{% trans "Could not connect to Redis broker" %}
|
|
|
|
</span>
|
|
|
|
</div>
|
2022-09-15 01:57:08 +00:00
|
|
|
|
2022-09-15 17:42:27 +00:00
|
|
|
{% endif %}
|
2022-09-15 01:57:08 +00:00
|
|
|
|
2022-09-15 17:42:27 +00:00
|
|
|
{% if stats %}
|
2022-09-15 01:57:08 +00:00
|
|
|
<section class="block content">
|
|
|
|
<h2>{% trans "Active Tasks" %}</h2>
|
|
|
|
{% for worker in active_tasks.values %}
|
|
|
|
<div class="table-container">
|
|
|
|
<table class="table is-striped is-fullwidth">
|
|
|
|
<tr>
|
|
|
|
<th>{% trans "ID" %}</th>
|
|
|
|
<th>{% trans "Task name" %}</th>
|
2022-09-15 17:42:27 +00:00
|
|
|
<th>{% trans "Run time" %}</th>
|
2022-09-15 01:57:08 +00:00
|
|
|
<th>{% trans "Priority" %}</th>
|
|
|
|
</tr>
|
2022-09-15 18:09:07 +00:00
|
|
|
{% if not worker %}
|
|
|
|
<tr>
|
|
|
|
<td colspan="4">
|
|
|
|
<em>{% trans "No active tasks" %}</em>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% for task in worker %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ task.id }}</td>
|
|
|
|
<td>{{ task.name|shortname }}</td>
|
|
|
|
<td>{{ task.time_start|runtime }}</td>
|
|
|
|
<td>{{ task.delivery_info.routing_key }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2022-09-15 01:57:08 +00:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
|
2022-09-15 17:42:27 +00:00
|
|
|
<section class="block content">
|
|
|
|
<h2>{% trans "Workers" %}</h2>
|
|
|
|
|
|
|
|
{% for worker_name, worker in stats.items %}
|
2022-09-15 18:09:07 +00:00
|
|
|
<div class="notification">
|
2022-09-15 17:42:27 +00:00
|
|
|
<h3>{{ worker_name }}</h3>
|
|
|
|
{% trans "Uptime:" %} {{ worker.uptime|uptime }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
|
2022-09-15 01:57:08 +00:00
|
|
|
{% else %}
|
|
|
|
|
|
|
|
<div class="notification is-danger is-flex is-align-items-start">
|
|
|
|
<span class="icon icon-warning is-size-4 pr-3" aria-hidden="true"></span>
|
|
|
|
<span>
|
|
|
|
{% trans "Could not connect to Celery" %}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-09-15 17:42:27 +00:00
|
|
|
{% if errors %}
|
|
|
|
<div class="block content">
|
|
|
|
<h2>{% trans "Errors" %}</h2>
|
|
|
|
{% for error in errors %}
|
|
|
|
<pre>{{ error }}</pre>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-09-15 01:57:08 +00:00
|
|
|
{% endblock %}
|