Skip to content

Instantly share code, notes, and snippets.

@wjrmffldrhrl
Last active May 24, 2022 08:17
Show Gist options
  • Save wjrmffldrhrl/ffc437a93da5f7dfaa38da0ae7e35bb9 to your computer and use it in GitHub Desktop.
Save wjrmffldrhrl/ffc437a93da5f7dfaa38da0ae7e35bb9 to your computer and use it in GitHub Desktop.
superset_config_for_celery_worker.py
class CeleryConfig(object):
broker_url = "redis://localhost:6379/0"
imports = (
"superset.sql_lab",
"superset.tasks",
)
result_backend = "redis://localhost:6379/0"
worker_log_level = "DEBUG"
worker_prefetch_multiplier = 10
task_acks_late = True
task_annotations = {
"sql_lab.get_sql_results": {
"rate_limit": "100/s",
}
}
CELERY_CONFIG = CeleryConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment