Celery
0
Вклад в тег
# tasks.py:
import celery
app = celery.Celery('tasks', broker='redis://127.0.0.1:6379')
@app.task
def show(arg):
print(arg)
app.conf.beat_schedule = {
'task-name': {
'task': 'tasks.show', # instead 'show'
'schedule': 5.0,
'args': (42,),
},
}
app.conf.timezone = 'UTC'