From c9b73df6f7096b2f9be2c883ff388e95b96c9da7 Mon Sep 17 00:00:00 2001 From: artemonsh Date: Wed, 21 Dec 2022 17:09:22 +0300 Subject: [PATCH] update celery config variables names --- CONTRIBUTING.md | 6 ++++-- docker/docker-bootstrap.sh | 2 +- docker/pythonpath_dev/superset_config.py | 13 ++++++------- superset/config.py | 1 - 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dde9a65316ef6..378a58eb4dc53 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,9 @@ little bit helps, and credit will always be given. - [Revert Guidelines](#revert-guidelines) - [Setup Local Environment for Development](#setup-local-environment-for-development) - [Documentation](#documentation) - - [Images](#images) + - [Local Development](#local-development) + - [Build](#build) + - [Deployment](#deployment) - [Flask server](#flask-server) - [OS Dependencies](#os-dependencies) - [Dependencies](#dependencies) @@ -1293,7 +1295,7 @@ To do this, you'll need to: - Start up a celery worker ```shell script - celery --app=superset.tasks.celery_app:app worker -Ofair + celery --app=superset.tasks.celery_app:app worker -O fair ``` Note that: diff --git a/docker/docker-bootstrap.sh b/docker/docker-bootstrap.sh index 150f351e4b0d7..0784a0fdf2e5b 100755 --- a/docker/docker-bootstrap.sh +++ b/docker/docker-bootstrap.sh @@ -37,7 +37,7 @@ fi if [[ "${1}" == "worker" ]]; then echo "Starting Celery worker..." - celery --app=superset.tasks.celery_app:app worker -Ofair -l INFO + celery --app=superset.tasks.celery_app:app worker -O fair -l INFO elif [[ "${1}" == "beat" ]]; then echo "Starting Celery beat..." celery --app=superset.tasks.celery_app:app beat --pidfile /tmp/celerybeat.pid -l INFO -s "${SUPERSET_HOME}"/celerybeat-schedule diff --git a/docker/pythonpath_dev/superset_config.py b/docker/pythonpath_dev/superset_config.py index 84c1dc58ab502..7bfe2012c27e9 100644 --- a/docker/pythonpath_dev/superset_config.py +++ b/docker/pythonpath_dev/superset_config.py @@ -81,13 +81,12 @@ def get_env_variable(var_name: str, default: Optional[str] = None) -> str: class CeleryConfig(object): - BROKER_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}" - CELERY_IMPORTS = ("superset.sql_lab",) - CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}" - CELERYD_LOG_LEVEL = "DEBUG" - CELERYD_PREFETCH_MULTIPLIER = 1 - CELERY_ACKS_LATE = False - CELERYBEAT_SCHEDULE = { + broker_url = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}" + imports = ("superset.sql_lab",) + result_backend = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}" + worker_prefetch_multiplier = 1 + task_acks_late = False + beat_schedule = { "reports.scheduler": { "task": "reports.scheduler", "schedule": crontab(minute="*", hour="*"), diff --git a/superset/config.py b/superset/config.py index 948e234e4ca0c..db4d174b428e8 100644 --- a/superset/config.py +++ b/superset/config.py @@ -845,7 +845,6 @@ class CeleryConfig: # pylint: disable=too-few-public-methods broker_url = "sqla+sqlite:///celerydb.sqlite" imports = ("superset.sql_lab",) result_backend = "db+sqlite:///celery_results.sqlite" - worker_log_level = "DEBUG" worker_prefetch_multiplier = 1 task_acks_late = False task_annotations = {