tasktiger
tasktiger copied to clipboard
Tasks stuck in active state for days
I've noticed some tasks are getting stuck in state active.
>>> count, tasks = Task.tasks_from_queue(tiger, queue + '.' + subqueue, 'active')
>>> count
1
>>> tasks
[<Task <function archive_data_for_user_and_month at 0x7fb18d5c8598>>]
>>> tasks[0]._data.get('unique')
True
>>> tasks[0]._data.get('time_last_queued')
1532891849.573912
>>> tasks[0]._ts
datetime.datetime(2018, 7, 30, 2, 37, 2, 150757)
>>> datetime.utcnow()
datetime.datetime(2018, 8, 2, 7, 55, 27, 503967)
Any idea as to a cause, and should I periodically look for and retry these tasks or should this be fixed inside tasktiger?
Could you also provide an example code of the task?