change cache db

This commit is contained in:
bakatrouble 2019-03-08 13:56:36 +03:00
parent 254deb21e3
commit 10f3612cf7
2 changed files with 3 additions and 3 deletions

View File

@ -7,14 +7,14 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
app = Celery('telegram_bots') app = Celery('telegram_bots')
app.config_from_object({ app.config_from_object({
'broker_url': 'redis://127.0.0.1:6379/1', 'broker_url': 'redis://127.0.0.1:6379/4',
'result_backend': 'django-db', 'result_backend': 'django-db',
'beat_scheduler': 'django_celery_beat.schedulers:DatabaseScheduler', 'beat_scheduler': 'django_celery_beat.schedulers:DatabaseScheduler',
'worker_concurrency': 4, 'worker_concurrency': 4,
'ONCE': { 'ONCE': {
'backend': 'celery_once.backends.Redis', 'backend': 'celery_once.backends.Redis',
'settings': { 'settings': {
'url': 'redis://localhost:6379/0', 'url': 'redis://localhost:6379/4',
'default_timeout': 60 * 60, 'default_timeout': 60 * 60,
} }
} }

View File

@ -93,7 +93,7 @@ STATICFILES_FINDERS = [
CACHES = { CACHES = {
"default": { "default": {
"BACKEND": "django_redis.cache.RedisCache", "BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1", "LOCATION": "redis://127.0.0.1:6379/4",
"OPTIONS": { "OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient", "CLIENT_CLASS": "django_redis.client.DefaultClient",
} }