-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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