Docfile commited on
Commit
1cab6a9
·
verified ·
1 Parent(s): 730be3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -6,6 +6,14 @@ from werkzeug.utils import secure_filename
6
  app = Flask(__name__)
7
  app.config['SQLALCHEMY_DATABASE_URI'] = "postgresql://neondb_owner:npg_vz5FLSXfj2sp@ep-late-block-adp1o88t-pooler.c-2.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require"
8
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
 
 
 
 
 
 
 
 
9
  UPLOAD_FOLDER = 'static/uploads'
10
  app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
11
  if not os.path.exists(UPLOAD_FOLDER):
 
6
  app = Flask(__name__)
7
  app.config['SQLALCHEMY_DATABASE_URI'] = "postgresql://neondb_owner:npg_vz5FLSXfj2sp@ep-late-block-adp1o88t-pooler.c-2.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require"
8
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
9
+
10
+
11
+ app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {
12
+ "pool_pre_ping": True,
13
+ "pool_recycle": 240,
14
+ }
15
+ # ---------------------------
16
+
17
  UPLOAD_FOLDER = 'static/uploads'
18
  app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
19
  if not os.path.exists(UPLOAD_FOLDER):