Commit 05724afe authored by Mathieu Rodic's avatar Mathieu Rodic

[CODE] simplified one of the scheduling decorators

parent 67d60c9d
......@@ -36,11 +36,8 @@ from celery import shared_task
def scheduled_celery(func):
"""Provides a decorator to schedule a task with Celery.
"""
@shared_task
def _func(*args, **kwargs):
func(*args, **kwargs)
def go(*args, **kwargs):
_func.apply_async(args=args, kwargs=kwargs)
shared_task(func).apply_async(args=args, kwargs=kwargs)
return go
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment