Koed00 / django-q

A multiprocessing distributed task queue for Django
https://django-q.readthedocs.org
MIT License
1.84k stars 290 forks source link

Tasks that timeout are not added to failed tasks. #251

Open kfuchs opened 7 years ago

kfuchs commented 7 years ago

When the process times out for a task the task is not added to failed tasks. It seems to just get lost.

Q_CLUSTER = {
    'name': 'default',
    'workers': 8,
    'recycle': 500,
    'timeout': 60,
    'compress': True,
    'save_limit': 250,
    'queue_limit': 500,
    'cpu_affinity': 1,
    'label': 'Django Q',
    'sync': False,
    'redis': {
        'host': 'localhost',
        'port': 6379,
        'db': 0,
        'password': None,
        'socket_timeout': None,
        'charset': 'utf-8',
        'errors': 'strict',
        'unix_socket_path': None
    }
}
LeoQuote commented 5 years ago

Yes, I thought django-q would raise an Exception and set the task as failed , but it turned out to be a simple warning in log.

lamby commented 5 years ago

Related: the method specified in hook is not called for tasks that have timed out. How can one detect failed tasks?