Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(celery) & docs(celery): update celery config variables names #22499

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions docker/pythonpath_dev/superset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="*"),
Expand Down
1 change: 0 additions & 1 deletion superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down