def queued_task(task):
 @functools.wraps(task)
 def wrapped(*args, **kwargs):
  signature = task.si(*args, **kwargs)
  enqueue_task(signature)
 return wrapped

def queued_task ( task ) : @ functools . wraps ( task ) def wrapped ( * args , ** kwargs ) : signature = task . si ( * args , ** kwargs ) enqueue_task ( signature ) return wrapped
decorator that adds the wrapped task to the queue on g if celery is enabled .