mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-18 18:38:06 +08:00
rename config var to max_retries, remove attempt_count form admin , add admin ui customization to docs
This commit is contained in:
@@ -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
|
||||
---------------
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user