add soft and hard time limits to every task

This commit is contained in:
codl 2017-09-30 20:44:27 +02:00
parent a6870d3775
commit 8422b6d89b
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ import pickle
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 = (
Queue('default', routing_key='celery'),
Queue('high_prio', routing_key='high'),