Skip to content

Commit

Permalink
Allow soft timeout to be overriden via env var.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed May 26, 2024
1 parent 4920949 commit e1b77aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions conf/configs/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,4 @@
CELERY_BROKER_URL = os.environ.get('PLATFORM_REDIS_HOST')
CELERY_RESULT_BACKEND = os.environ.get('PLATFORM_REDIS_HOST')
CELERY_TASK_SOFT_TIME_LIMIT = os.environ.get('PLATFORM_REDIS_TASK_TIMEOUT', 60)
CELERY_TASK_CALENDAR_SYNC_SOFT_TIME_LIMIT = os.environ.get('PLATFORM_REDIS_CALENDAR_SYNC_TASK_TIMEOUT', 60*5)
2 changes: 1 addition & 1 deletion helium/feed/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
logger = logging.getLogger(__name__)


@app.task(soft_time_limit=60*5)
@app.task(soft_time_limit=settings.CELERY_TASK_CALENDAR_SYNC_SOFT_TIME_LIMIT)
def reindex_external_calendars():
metrics = metricutils.task_start("reindex_external_calendars")

Expand Down

0 comments on commit e1b77aa

Please sign in to comment.