mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-22 08:13:33 +01:00
Make short task time limit configureable
This commit is contained in:
parent
15d217453b
commit
0d73256de9
@ -418,6 +418,7 @@ CELERY_TASK_SERIALIZER = "json"
|
|||||||
CELERY_RESULT_SERIALIZER = "json"
|
CELERY_RESULT_SERIALIZER = "json"
|
||||||
CELERY_TIMEZONE = TIME_ZONE
|
CELERY_TIMEZONE = TIME_ZONE
|
||||||
CELERY_SOFT_TIME_LIMIT = 2 * 60 * 60
|
CELERY_SOFT_TIME_LIMIT = 2 * 60 * 60
|
||||||
|
CELERY_SHORT_SOFT_TIME_LIMIT = 60 * 30
|
||||||
CELERY_WORKER_PREFETCH_MULTIPLIER = 1
|
CELERY_WORKER_PREFETCH_MULTIPLIER = 1
|
||||||
CELERYD_PREFETCH_MULTIPLIER = 1
|
CELERYD_PREFETCH_MULTIPLIER = 1
|
||||||
|
|
||||||
|
@ -9,4 +9,4 @@ user=www-data
|
|||||||
directory=/home/mediacms.io/mediacms
|
directory=/home/mediacms.io/mediacms
|
||||||
priority=400
|
priority=400
|
||||||
startinorder=true
|
startinorder=true
|
||||||
command=/home/mediacms.io/bin/celery multi start short1 short2 --pidfile=/var/run/mediacms/%%n.pid --loglevel=INFO --logfile=/home/mediacms.io/mediacms/logs/celery_short.log --soft-time-limit=300 -c10 -Q short_tasks
|
command=/home/mediacms.io/bin/celery multi start short1 short2 --pidfile=/var/run/mediacms/%%n.pid --loglevel=INFO --logfile=/home/mediacms.io/mediacms/logs/celery_short.log -c10 -Q short_tasks
|
||||||
|
@ -48,7 +48,7 @@ ERRORS_LIST = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@task(name="chunkize_media", bind=True, queue="short_tasks", soft_time_limit=60 * 30)
|
@task(name="chunkize_media", bind=True, queue="short_tasks", soft_time_limit=settings.CELERY_SHORT_SOFT_TIME_LIMIT)
|
||||||
def chunkize_media(self, friendly_token, profiles, force=True):
|
def chunkize_media(self, friendly_token, profiles, force=True):
|
||||||
"""Break media in chunks and start encoding tasks"""
|
"""Break media in chunks and start encoding tasks"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user