Skip to content

Commit

Permalink
Merge pull request #2 from vintasoftware/more-info-about-tasks
Browse files Browse the repository at this point in the history
adds tasks name, args and kwargs
  • Loading branch information
hugobessa authored Aug 25, 2017
2 parents ac2937b + bd5dac3 commit 37e43b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions celery_beat_status/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from celery.beat import Service
from django.utils import timezone
import datetime
import json


def get_periodic_tasks_info():
Expand All @@ -18,6 +19,9 @@ def get_periodic_tasks_info():

tasks.append({
'name': key,
'task': entry.task,
'args': '(' + ', '.join([json.dumps(arg) for arg in entry.args]) + ')',
'kwargs': json.dumps(entry.kwargs),
'is_due': is_due_tpl[0],
'next_execution': next_execution
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<ul>
<li><strong>{% trans 'Is due?' %}</strong> {% if task.is_due %} {% trans 'Yes' %} {% else %} {% trans 'No' %} {% endif %} </li>
<li><strong>{% trans 'Next execution:' %}</strong> {{ task.next_execution | date:"m/d/Y fa e" }}</li>
<li><strong>{% trans 'Task:' %}</strong> {{ task.next_execution | date:"m/d/Y fa e" }}</li>
<li><strong>{% trans 'Arguments:' %}</strong> {{ task.args }}</li>
<li><strong>{% trans 'Keyword Arguments:' %}</strong> {{ task.kwargs }}</li>
</ul>
</li>
{% endfor %}
Expand Down

0 comments on commit 37e43b4

Please sign in to comment.