mirror of
https://github.com/codl/forget
synced 2025-01-19 10:31:10 +01:00
add soft and hard time limits to every task
This commit is contained in:
parent
a6870d3775
commit
8422b6d89b
5
tasks.py
5
tasks.py
@ -19,7 +19,10 @@ import pickle
|
|||||||
|
|
||||||
|
|
||||||
app = Celery('tasks', broker=flaskapp.config['CELERY_BROKER'],
|
app = Celery('tasks', broker=flaskapp.config['CELERY_BROKER'],
|
||||||
task_serializer='pickle')
|
task_serializer='pickle',
|
||||||
|
task_soft_time_limit=600,
|
||||||
|
task_time_limit=1200,
|
||||||
|
)
|
||||||
app.conf.task_queues = (
|
app.conf.task_queues = (
|
||||||
Queue('default', routing_key='celery'),
|
Queue('default', routing_key='celery'),
|
||||||
Queue('high_prio', routing_key='high'),
|
Queue('high_prio', routing_key='high'),
|
||||||
|
Loading…
Reference in New Issue
Block a user