Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -74,7 +74,13 @@ class SentimentLog(Base):
|
|
74 |
message = Column(Text)
|
75 |
|
76 |
# Initialize Database
|
77 |
-
engine = create_async_engine(
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
async_session = sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)
|
79 |
|
80 |
async def init_db():
|
|
|
74 |
message = Column(Text)
|
75 |
|
76 |
# Initialize Database
|
77 |
+
engine = create_async_engine(
|
78 |
+
DATABASE_URL,
|
79 |
+
echo=True,
|
80 |
+
connect_args={"ssl": ssl_context, "timeout": 30}, # increase timeout as needed
|
81 |
+
)
|
82 |
+
|
83 |
+
ssl_context = ssl.create_default_context(cafile="rds-combined-ca-bundle.pem")
|
84 |
async_session = sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)
|
85 |
|
86 |
async def init_db():
|