feat: Initialize FastAPI AI Gateway project structure with authentication, module management, and LLM API routing.
This commit is contained in:
18
debug_db.py
Normal file
18
debug_db.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import psycopg2
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
def test_db():
|
||||
url = os.getenv("DATABASE_URL")
|
||||
print(f"Testing connection to: {url.split('@')[-1]}")
|
||||
try:
|
||||
conn = psycopg2.connect(url)
|
||||
print("Raw psycopg2 connection successful!")
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print(f"Raw psycopg2 connection failed: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_db()
|
||||
Reference in New Issue
Block a user