File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 124124 "DATABASE_URL" , default = f"postgresql://hsdbadmin:admin@localhost:5432/hydroserver"
125125)
126126
127+ dj_database_config = dj_database_url .config (
128+ engine = "django.db.backends.postgresql" ,
129+ conn_health_checks = config ("CONN_HEALTH_CHECKS" , default = True , cast = bool ),
130+ ssl_require = config ("SSL_REQUIRED" , default = False , cast = bool ),
131+ )
132+
127133DATABASES = {
128134 "default" : {
129- ** dj_database_url .config (
130- engine = "django.db.backends.postgresql" ,
131- conn_health_checks = config ("CONN_HEALTH_CHECKS" , default = True , cast = bool ),
132- ssl_require = config ("SSL_REQUIRED" , default = False , cast = bool ),
133- ),
135+ ** dj_database_config ,
134136 "OPTIONS" : {
135137 "application_name" : "HydroServer" ,
136138 "pool" : {
137139 "min_size" : config ("DB_POOL_MIN_SIZE" , default = 5 , cast = int ),
138140 "max_size" : config ("DB_POOL_MAX_SIZE" , default = 10 , cast = int ),
139141 "timeout" : config ("DB_POOL_TIMEOUT" , default = 60 , cast = int ),
140142 },
143+ ** dj_database_config .get ("OPTIONS" , {})
141144 },
142145 }
143146}
You can’t perform that action at this time.
0 commit comments