mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 14:36:34 +00:00
commit
00b88fc87d
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base.html' %}{% load humanize %}
|
{% extends 'base.html' %}{% load humanize %}{% load filters %}
|
||||||
|
|
||||||
{% block headtitle %}Tasks{% endblock %}
|
{% block headtitle %}Tasks{% endblock %}
|
||||||
|
|
||||||
@ -56,7 +56,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h2>{{ total_scheduled|intcomma }} Scheduled ({{ scheduled|length|intcomma }} on this page)</h2>
|
{% with adjusted=total_scheduled|sub:total_errors %}
|
||||||
|
<h2>{{ adjusted|intcomma }} Scheduled ({{ scheduled|length|intcomma }} on this page)</h2>
|
||||||
|
{% endwith %}
|
||||||
<p>
|
<p>
|
||||||
Tasks which are scheduled to run in the future or are waiting in a queue to be
|
Tasks which are scheduled to run in the future or are waiting in a queue to be
|
||||||
processed. They can be waiting for an available worker to run immediately, or
|
processed. They can be waiting for an available worker to run immediately, or
|
||||||
|
@ -12,3 +12,14 @@ def bytesformat(input):
|
|||||||
return output
|
return output
|
||||||
return output[: -1 ] + 'iB'
|
return output[: -1 ] + 'iB'
|
||||||
|
|
||||||
|
@register.filter(is_safe=False)
|
||||||
|
def sub(value, arg):
|
||||||
|
"""Subtract the arg from the value."""
|
||||||
|
try:
|
||||||
|
return int(value) - int(arg)
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
try:
|
||||||
|
return value - arg
|
||||||
|
except Exception:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
@ -858,9 +858,9 @@ class TasksView(ListView):
|
|||||||
)
|
)
|
||||||
sort_keys = (
|
sort_keys = (
|
||||||
# key, reverse
|
# key, reverse
|
||||||
('run_now', True),
|
|
||||||
('priority', 'ASC' != order),
|
|
||||||
('run_at', False),
|
('run_at', False),
|
||||||
|
('priority', 'ASC' != order),
|
||||||
|
('run_now', True),
|
||||||
)
|
)
|
||||||
data['errors'] = multi_key_sort(data['errors'], sort_keys, attr=True)
|
data['errors'] = multi_key_sort(data['errors'], sort_keys, attr=True)
|
||||||
data['scheduled'] = multi_key_sort(data['scheduled'], sort_keys, attr=True)
|
data['scheduled'] = multi_key_sort(data['scheduled'], sort_keys, attr=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user