An inspection of currently running Celery tasks reveals a weird time_start
timestamp:
>> celery.app.control.inspect().active()
{u'celery@worker.hostname': [{u'acknowledged': True,
u'args': u'(...,)',
u'delivery_info': {u'exchange': u'celery',
u'priority': 0,
u'redelivered': None,
u'routing_key': u'celery'},
u'hostname': u'celery@worker.hostname',
u'id': u'3d92fdfd-524e-4ba1-98cb-cf83af2ad8e9',
u'kwargs': u'{}',
u'name': u'task_name',
u'time_start': 9636801.218162088,
u'worker_pid': 7931}]}
The time_start
attribute dates the task back to 1970 (that's before the creation of Celery, Python, and I don't own a customised DeLorean):
>> from datetime import datetime
>> datetime.fromtimestamp(9636801.218162088)
datetime.datetime(1970, 4, 22, 13, 53, 21, 218162)
Am I misinterpreting the time_task
attribute? Is my Celery app misconfigured?
I am using Celery 3.1.4 on Linux with a Django app and a Redis backend.
Tasks are run by a worker that is executed as follows:
./manage.py celery worker --loglevel=INFO --soft-time-limit=600 --logfile=/tmp/w1.log --pidfile=/tmp/w1.pid -n 'w1.%%h'