rasAli02 commited on
Commit
ba2e359
Β·
1 Parent(s): 86848b9

πŸš€ Deployment: Add dnspython and skip blocking ping to fix Vercel startup

Browse files
Files changed (2) hide show
  1. backend/app.py +3 -3
  2. backend/requirements.txt +1 -0
backend/app.py CHANGED
@@ -43,12 +43,12 @@ async def _init_db():
43
  serverSelectionTimeoutMS=5000,
44
  tlsCAFile=certifi.where()
45
  )
46
- # Verify connection
47
- await client.admin.command("ping")
48
  _db = client["forgesight"]
49
  _inspections_col = _db["inspections"]
50
  _journal_col = _db["journal"]
51
- print("βœ… MongoDB connected – persistence enabled")
52
  except Exception as e:
53
  print(f"⚠️ MongoDB unavailable ({e}) – using in-memory storage")
54
 
 
43
  serverSelectionTimeoutMS=5000,
44
  tlsCAFile=certifi.where()
45
  )
46
+ # Verify connection - Skip ping during startup to avoid Vercel timeouts
47
+ # await client.admin.command("ping")
48
  _db = client["forgesight"]
49
  _inspections_col = _db["inspections"]
50
  _journal_col = _db["journal"]
51
+ print("βœ… MongoDB client initialized")
52
  except Exception as e:
53
  print(f"⚠️ MongoDB unavailable ({e}) – using in-memory storage")
54
 
backend/requirements.txt CHANGED
@@ -7,3 +7,4 @@ fpdf==1.7.2
7
  pydantic>=2.6.4
8
  python-dotenv>=1.0.1
9
  python-multipart>=0.0.9
 
 
7
  pydantic>=2.6.4
8
  python-dotenv>=1.0.1
9
  python-multipart>=0.0.9
10
+ dnspython==2.6.1