mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 00:18:11 +08:00
Admin improvements (#11)
* Add the group column to OrmQ admin page * Add group field to tasks list and search_field * Add search by name to Schedule admin page * Limit succesful task history per schedule with SAVE_LIMIT_GROUP config * Improve ScheduleAdmin list view performance Co-authored-by: Marc Sabatier <marc@sabatier.online>
This commit is contained in:
co-authored by
Marc Sabatier
parent
4aa6325ae8
commit
e3f959c258
+6
-2
@@ -86,6 +86,10 @@ class Conf:
|
||||
# Failures are always saved
|
||||
SAVE_LIMIT = conf.get("save_limit", 250)
|
||||
|
||||
# Maximum number of successful tasks of the same group kept in the database. 0 saves everything. -1 saves none
|
||||
# Failures are always saved
|
||||
SAVE_LIMIT_PER_GROUP = conf.get("save_limit_per_group", 5)
|
||||
|
||||
# Guard loop sleep in seconds. Should be between 0 and 60 seconds.
|
||||
GUARD_CYCLE = conf.get("guard_cycle", 0.5)
|
||||
|
||||
@@ -137,8 +141,8 @@ class Conf:
|
||||
# Verify if retry and timeout settings are correct
|
||||
if not TIMEOUT or (TIMEOUT > RETRY):
|
||||
warn(
|
||||
"""Retry and timeout are misconfigured. Set retry larger than timeout,
|
||||
failure to do so will cause the tasks to be retriggered before completion.
|
||||
"""Retry and timeout are misconfigured. Set retry larger than timeout,
|
||||
failure to do so will cause the tasks to be retriggered before completion.
|
||||
See https://django-q.readthedocs.io/en/latest/configure.html#retry for details."""
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user