mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-25 10:33:47 +03:00
6e0bc424d7
2) RedisStorage now prevents parallel sync with RedisLock
83 lines
1.7 KiB
Python
83 lines
1.7 KiB
Python
"""
|
|
This file contains django settings to run tests with runtests.py
|
|
"""
|
|
SECRET_KEY = 'fake-key'
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'NAME': 'test',
|
|
'USER': 'test',
|
|
'PASSWORD': 'test',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '5432'
|
|
},
|
|
|
|
# I need separate connections for multiprocessing tests
|
|
'create': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'NAME': 'test',
|
|
'USER': 'test',
|
|
'PASSWORD': 'test',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '5432'
|
|
},
|
|
'update': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'NAME': 'test',
|
|
'USER': 'test',
|
|
'PASSWORD': 'test',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '5432'
|
|
},
|
|
'delete': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'NAME': 'test',
|
|
'USER': 'test',
|
|
'PASSWORD': 'test',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '5432'
|
|
},
|
|
}
|
|
|
|
LOGGING = {
|
|
'version': 1,
|
|
'handlers': {
|
|
'console': {
|
|
'class': 'logging.StreamHandler',
|
|
},
|
|
},
|
|
'loggers': {
|
|
'django-clickhouse': {
|
|
'handlers': ['console'],
|
|
'level': 'DEBUG'
|
|
},
|
|
'infi.clickhouse-orm': {
|
|
'handlers': ['console'],
|
|
'level': 'INFO'
|
|
}
|
|
}
|
|
}
|
|
|
|
INSTALLED_APPS = [
|
|
"src",
|
|
"tests"
|
|
]
|
|
|
|
CLICKHOUSE_DATABASES = {
|
|
'default': {
|
|
'db_name': 'test',
|
|
'username': 'default',
|
|
'password': ''
|
|
}
|
|
}
|
|
|
|
CLICKHOUSE_SYNC_BATCH_SIZE = 5000
|
|
|
|
CLICKHOUSE_REDIS_CONFIG = {
|
|
'host': '127.0.0.1',
|
|
'port': 6379,
|
|
'db': 8,
|
|
'socket_timeout': 10
|
|
}
|