Skip to content

Commit 1790ea2

Browse files
adding connection pooling to redis (#554)
1 parent 1cf8cfc commit 1790ea2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

djangosnippets/settings/production.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ def env_to_bool(input):
7979
"OPTIONS": {
8080
"PASSWORD": redis_url.password,
8181
"DB": 0,
82+
"CONNECTION_POOL_CLASS": "redis.BlockingConnectionPool",
83+
"CONNECTION_POOL_CLASS_KWARGS": {
84+
"max_connections": 20,
85+
"timeout": 20,
86+
},
8287
},
8388
}
8489
}

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
web:
1313
build: .
1414
environment:
15-
- REDISTOGO_URL=${REDISTOGO_URL}
15+
- REDISCLOUD_URL=${REDISCLOUD_URL}
1616
- SECRET_KEY=${SECRET_KEY}
1717
- DEBUG=${DEBUG}
1818
- ALLOWED_HOSTS=${ALLOWED_HOSTS}

0 commit comments

Comments
 (0)