superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Use sane Celery defaults to prevent tasks from being delayed (#3267)
Date Thu, 10 Aug 2017 05:34:43 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 08b7e89  Use sane Celery defaults to prevent tasks from being delayed (#3267)
08b7e89 is described below

commit 08b7e891a7dd65616aef4177b72b1e8770310d98
Author: Alex Guziel <saguziel@gmail.com>
AuthorDate: Wed Aug 9 22:34:39 2017 -0700

    Use sane Celery defaults to prevent tasks from being delayed (#3267)
---
 superset/cli.py    | 2 +-
 superset/config.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/cli.py b/superset/cli.py
index f6163bb..e4165e6 100755
--- a/superset/cli.py
+++ b/superset/cli.py
@@ -194,7 +194,7 @@ def worker(workers):
         celery_app.conf.update(
             CELERYD_CONCURRENCY=config.get("SUPERSET_CELERY_WORKERS"))
 
-    worker = celery_worker.worker(app=celery_app)
+    worker = celery_app.Worker(optimization='fair')
     worker.run()
 
 
diff --git a/superset/config.py b/superset/config.py
index bc91edd..94d8dfc 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -245,6 +245,8 @@ class CeleryConfig(object):
   CELERY_RESULT_BACKEND = 'db+sqlite:///celery_results.sqlite'
   CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
   CELERYD_LOG_LEVEL = 'DEBUG'
+  CELERYD_PREFETCH_MULTIPLIER = 1
+  CELERY_ACKS_LATE = True
 CELERY_CONFIG = CeleryConfig
 """
 CELERY_CONFIG = None

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message