mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
06fcaa3095
* upgrade celery to 4.0.2 * using Redis for unit tests (sqla broker not supported in Celery 4) * Setting Celery's soft_time_limit based on `SQLLAB_ASYNC_TIME_LIMIT_SEC` config * Better error handling in async tasks * Better statsd logging in async tasks * show [pending/running] query status in Results tab * systematically using sqla NullPool on worker (async) to limit number of database connections
32 lines
1010 B
Python
32 lines
1010 B
Python
from superset.config import *
|
|
|
|
AUTH_USER_REGISTRATION_ROLE = 'alpha'
|
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(DATA_DIR, 'unittests.db')
|
|
DEBUG = True
|
|
SUPERSET_WEBSERVER_PORT = 8081
|
|
|
|
# Allowing SQLALCHEMY_DATABASE_URI to be defined as an env var for
|
|
# continuous integration
|
|
if 'SUPERSET__SQLALCHEMY_DATABASE_URI' in os.environ:
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('SUPERSET__SQLALCHEMY_DATABASE_URI')
|
|
|
|
SQL_CELERY_RESULTS_DB_FILE_PATH = os.path.join(DATA_DIR, 'celery_results.sqlite')
|
|
SQL_SELECT_AS_CTA = True
|
|
SQL_MAX_ROW = 666
|
|
|
|
TESTING = True
|
|
SECRET_KEY = 'thisismyscretkey'
|
|
WTF_CSRF_ENABLED = False
|
|
PUBLIC_ROLE_LIKE_GAMMA = True
|
|
AUTH_ROLE_PUBLIC = 'Public'
|
|
EMAIL_NOTIFICATIONS = False
|
|
|
|
|
|
class CeleryConfig(object):
|
|
BROKER_URL = 'redis://localhost'
|
|
CELERY_IMPORTS = ('superset.sql_lab', )
|
|
CELERY_RESULT_BACKEND = 'db+sqlite:///' + SQL_CELERY_RESULTS_DB_FILE_PATH
|
|
CELERY_ANNOTATIONS = {'sql_lab.add': {'rate_limit': '10/s'}}
|
|
CONCURRENCY = 1
|
|
CELERY_CONFIG = CeleryConfig
|