mirror of
https://github.com/apache/superset.git
synced 2026-04-07 10:31:50 +00:00
tests(celery): improve celery tests infra (#9775)
This commit is contained in:
committed by
GitHub
parent
d02f2d1fa7
commit
4427d65717
@@ -63,19 +63,23 @@ SQLALCHEMY_DATABASE_URI = "%s://%s:%s@%s:%s/%s" % (
|
||||
|
||||
REDIS_HOST = get_env_variable("REDIS_HOST")
|
||||
REDIS_PORT = get_env_variable("REDIS_PORT")
|
||||
REDIS_CELERY_DB = get_env_variable("REDIS_CELERY_DB", 0)
|
||||
REDIS_RESULTS_DB = get_env_variable("REDIS_CELERY_DB", 1)
|
||||
|
||||
|
||||
RESULTS_BACKEND = FileSystemCache("/app/superset_home/sqllab")
|
||||
|
||||
|
||||
class CeleryConfig(object):
|
||||
BROKER_URL = "redis://%s:%s/0" % (REDIS_HOST, REDIS_PORT)
|
||||
BROKER_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}"
|
||||
CELERY_IMPORTS = ("superset.sql_lab",)
|
||||
CELERY_RESULT_BACKEND = "redis://%s:%s/1" % (REDIS_HOST, REDIS_PORT)
|
||||
CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}"
|
||||
CELERY_ANNOTATIONS = {"tasks.add": {"rate_limit": "10/s"}}
|
||||
CELERY_TASK_PROTOCOL = 1
|
||||
|
||||
|
||||
CELERY_CONFIG = CeleryConfig
|
||||
SQLLAB_CTAS_NO_LIMIT = True
|
||||
|
||||
#
|
||||
# Optionally import superset_config_docker.py (which will have been included on
|
||||
|
||||
Reference in New Issue
Block a user