12 lines
173 B
Python
12 lines
173 B
Python
|
import time
|
||
|
|
||
|
from celery import shared_task
|
||
|
|
||
|
@shared_task
|
||
|
def add(x, y):
|
||
|
return x + y
|
||
|
|
||
|
@shared_task
|
||
|
def wait(x):
|
||
|
time.sleep(x)
|
||
|
return f"Sleeping for {x} seconds"
|