rename config var to max_retries, remove attempt_count form admin , add admin ui customization to docs

This commit is contained in:
Tim O'Meara
2020-08-13 11:58:00 -05:00
parent 991cca5844
commit 655f0aadb5
7 changed files with 32 additions and 11 deletions

View File

@@ -33,6 +33,29 @@ You can resubmit a failed task back to the queue using the admins action menu.
Uses the :class:`Failure` proxy model
Customize the admin UI by creating your own ``admin.ModelAdmin`` class and use ``admin.site.unregister`` and ``admin.site.register`` to replace the default
for example:
.. code-block:: python
from django_q import models as q_models
from django_q import admin as q_admin
admin.site.unregister([q_models.Failure])
@admin.register(q_models.Failure)
class ChildClassAdmin(q_admin.FailAdmin):
list_display = (
'name',
'func',
'result',
'started',
# add attempt_count to list_display
'attempt_count'
)
Scheduled tasks
---------------

View File

@@ -76,12 +76,12 @@ ack_failures
When set to ``True``, also acknowledge unsuccessful tasks. This causes failed tasks to be considered as successful deliveries, thereby removing them from the task queue. Can also be set per-task by passing the ``ack_failure`` option to :func:`async_task`. Defaults to ``False``.
.. attempt_count:
.. _max_attempts:
attempt_count
max_attempts
~~~~~~~~~~~~~
Limit the number of retries for failed tasks. Set to 0 for infinite retries. Defaults to 0
Limit the number of retry attempts for failed tasks. Set to 0 for infinite retries. Defaults to 0
.. _retry: