任务运行一次,长芹菜任务(5-6小时)开始大约每小时复制一次,最多4个(并发参数)。
日志:
[2016-08-19 07:43:08,505: INFO/MainProcess] Received task: doit[ed09d5fd-ba07-4cd5-96eb-7ae546bf94db]
[2016-08-19 07:45:44,067: INFO/MainProcess] Received task: doit[7cbc4633-0687-499f-876c-3298ffdf90f9]
[2016-08-19 08:41:16,611: INFO/MainProcess] Received task: doit[ed09d5fd-ba07-4cd5-96eb-7ae546bf94db]
[2016-08-19 08:48:36,623: INFO/MainProcess] Received task: doit[7cbc4633-0687-499f-876c-3298ffdf90f9]
任务代码
@task()
def doit(company_id, cls):
p = cls.objects.get(id=company_id)
芹菜工作者以--concurrency=4 -Ofair
开始,经纪人 - Redis 3.0.5版本。
Python包版本:
Django==1.8.14
celery==3.1.18
redis==2.10.3