From 3a733fd7bf87420da82321a3f1dae1cbb7b5daf5 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 21 Nov 2023 16:19:42 +0000 Subject: [PATCH] Disable Celery rate limits in dev --- h/celery.py | 2 ++ tox.ini | 1 + 2 files changed, 3 insertions(+) diff --git a/h/celery.py b/h/celery.py index 685e48bbb00..731ea7becdc 100644 --- a/h/celery.py +++ b/h/celery.py @@ -73,6 +73,8 @@ # This can be overridden on a per-task basis by adding time_limit=n to the # task's @app.task() arguments. task_time_limit=240, + # Disable Celery task rate limits in local development. + worker_disable_rate_limits=os.environ.get("DEV") == "true", imports=( "h.tasks.annotations", "h.tasks.cleanup", diff --git a/tox.ini b/tox.ini index d86433b649f..7e6f10efc06 100644 --- a/tox.ini +++ b/tox.ini @@ -81,6 +81,7 @@ passenv = setenv = PYTHONUNBUFFERED = 1 REPORT_FDW_USERS=lms-fdw report-fdw + dev: DEV = {env:DEV:true} dev: PYTHONPATH = . dev: APP_URL = {env:APP_URL:http://localhost:5000} dev: WEBSOCKET_URL = {env:WEBSOCKET_URL:ws://localhost:5001/ws}