/usr/lib/python2.7/dist-packages/celery/tests/functional/tasks.py is in python-celery 3.1.6-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from __future__ import absolute_import
import time
from celery import task, signature
@task()
def add(x, y):
return x + y
@task()
def add_cb(x, y, callback=None):
result = x + y
if callback:
return signature(callback).apply_async(result)
return result
@task()
def sleeptask(i):
time.sleep(i)
return i
|