2 Oct
2024
2 Oct
'24
12:58 p.m.
Tried to add these lines before the test in the conf.py
and nothing changes. Should I remove the test on TIMEOUT ?
# Number of seconds to wait for a worker to finish.
TIMEOUT = conf.get("timeout", 58)
# Whether to acknowledge unsuccessful tasks.
# This causes failed tasks to be considered delivered, thereby removing them from
# the task queue. Defaults to False.
ACK_FAILURES = conf.get("ack_failures", False)
# Number of seconds to wait for acknowledgement before retrying a task
# Only works with brokers that guarantee delivery. Defaults to 60 seconds.
RETRY = conf.get("retry", 60)
Q_CLUSTER = {
'timeout': 300,
'retry': 360,
'save_limit': 100,
'orm': 'default',
}
# 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.
See https://django-q.readthedocs.io/en/latest/configure.html#retry for details."""
)