mirror of
https://github.com/apache/superset.git
synced 2026-05-11 19:05:24 +00:00
* Refactor the query runner to enable async mode. * Refactore the sql calling functions into the QueryRunner class. * Clean up the celery tests.
26 lines
940 B
Python
26 lines
940 B
Python
from caravel.config import *
|
|
|
|
AUTH_USER_REGISTRATION_ROLE = 'alpha'
|
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(DATA_DIR, 'unittests.db')
|
|
DEBUG = True
|
|
CARAVEL_WEBSERVER_PORT = 8081
|
|
|
|
# Allowing SQLALCHEMY_DATABASE_URI to be defined as an env var for
|
|
# continuous integration
|
|
if 'CARAVEL__SQLALCHEMY_DATABASE_URI' in os.environ:
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('CARAVEL__SQLALCHEMY_DATABASE_URI')
|
|
|
|
SQL_CELERY_DB_FILE_PATH = os.path.join(DATA_DIR, 'celerydb.sqlite')
|
|
SQL_CELERY_RESULTS_DB_FILE_PATH = os.path.join(DATA_DIR, 'celery_results.sqlite')
|
|
SQL_SELECT_AS_CTA = True
|
|
SQL_MAX_ROW = 666
|
|
|
|
|
|
class CeleryConfig(object):
|
|
BROKER_URL = 'sqla+sqlite:///' + SQL_CELERY_DB_FILE_PATH
|
|
CELERY_IMPORTS = ('caravel.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
|