mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 13:08:34 +03:00
adjusts limits for deployment performance
This commit is contained in:
@@ -12,10 +12,13 @@ def get_celery(name: str = "") -> Celery:
|
||||
name,
|
||||
broker_url=get_settings().celery_broker_url,
|
||||
result_backend=get_settings().celery_broker_url,
|
||||
broker_connection_retry_on_startup=False,
|
||||
broker_connection_retry_on_startup=True,
|
||||
broker_transport_options={
|
||||
"queue_order_strategy": "priority",
|
||||
"visibility_timeout": 43200, # 12 hours - must be > longest task time_limit
|
||||
},
|
||||
result_expires=86400, # expire task results after 24 hours to prevent Redis memory buildup
|
||||
worker_cancel_long_running_tasks_on_connection_loss=True,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user