Skip to content

Instantly share code, notes, and snippets.

@jorilallo
Forked from sjl/urls.py
Created September 23, 2011 17:04
Show Gist options
  • Save jorilallo/1237896 to your computer and use it in GitHub Desktop.
Save jorilallo/1237896 to your computer and use it in GitHub Desktop.
Monkeypatch the Celery admin to show a column for task run time in the list view.
# Put this in your urls.py file after the admin.autodiscover() line.
# ---------------------------------------------------------------------------------
# Monkeypatch the Celery admin to show a column for task run time in the list view.
from djcelery.admin import TaskMonitor
from djcelery.models import TaskState
admin.site.unregister([TaskState])
TaskMonitor.list_display += ('runtime',)
admin.site.register(TaskState, TaskMonitor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment