开发者

celery 2.x @periodic_task's not showing up in task registry

开发者 https://www.devze.com 2023-01-17 01:07 出处:网络
I\'ve recently updated to celery 2.0 and I\'m trying to use the new (to me) decorators for periodic tasks:

I've recently updated to celery 2.0 and I'm trying to use the new (to me) decorators for periodic tasks:

@periodic_task(run_every=timedelta(days=1))
def some_task(**kwargs开发者_运维问答):
    #task here

I also have some other code is my site that lists periodic tasks and how often they run using

from celery.registry import tasks

to get the list of tasks. My issue is that tasks added using the decorator don't seem to show up in this list of tasks. Is there a way to get a list of tasks added using the decorators in celery 2.0?

0

精彩评论

暂无评论...
验证码 换一张
取 消