Skip to content

Commit 8e90435

Browse files
committed
Use sane Celery defaults to prevent tasks from being delayed
1 parent 327c052 commit 8e90435

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

superset/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def worker(workers):
194194
celery_app.conf.update(
195195
CELERYD_CONCURRENCY=config.get("SUPERSET_CELERY_WORKERS"))
196196

197-
worker = celery_worker.worker(app=celery_app)
197+
worker = celery_app.Worker(optimization='fair')
198198
worker.run()
199199

200200

superset/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ class CeleryConfig(object):
245245
CELERY_RESULT_BACKEND = 'db+sqlite:///celery_results.sqlite'
246246
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
247247
CELERYD_LOG_LEVEL = 'DEBUG'
248+
CELERYD_PREFETCH_MULTIPLIER = 1
249+
CELERY_ACKS_LATE = True
248250
CELERY_CONFIG = CeleryConfig
249251
"""
250252
CELERY_CONFIG = None

0 commit comments

Comments
 (0)