Commit a426488c authored by Ziirish's avatar Ziirish

force celery tasks scheduling only in celery mode to avoid putting to much pressure on the backend

parent 15be9a62
Pipeline #1619 passed with stages
in 11 minutes and 32 seconds
......@@ -320,8 +320,9 @@ def create_celery(myapp, warn=True):
# may fail in case redis is not running (this can happen while running
# the bui-manage script)
try:
from .tasks import force_scheduling_now
force_scheduling_now()
if os.getenv('BUI_MODE', '') == 'celery':
from .tasks import force_scheduling_now
force_scheduling_now()
except: # pragma: no cover
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment