Spaces:
Running
Running
Update config.py
Browse files
config.py
CHANGED
|
@@ -5,5 +5,13 @@ class Config:
|
|
| 5 |
|
| 6 |
SQLALCHEMY_DATABASE_URI =os.getenv("DATABASE_URL")
|
| 7 |
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
FLASK_ADMIN_SWATCH = 'cerulean' # Optionnel, permet de changer le style facilement
|
|
|
|
| 5 |
|
| 6 |
SQLALCHEMY_DATABASE_URI =os.getenv("DATABASE_URL")
|
| 7 |
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
| 8 |
+
|
| 9 |
+
SQLALCHEMY_ENGINE_OPTIONS = {
|
| 10 |
+
# Recycle connections after 280 seconds (less than potential 5-min server timeout)
|
| 11 |
+
'pool_recycle': 280,
|
| 12 |
+
# Optionally, enable pre-ping for extra robustness (recommended)
|
| 13 |
+
'pool_pre_ping': True
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
|
| 17 |
FLASK_ADMIN_SWATCH = 'cerulean' # Optionnel, permet de changer le style facilement
|