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}