mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-18 15:29:36 +00:00
fix: Add SessionLocal and async_session_factory aliases to database.py
Critical bug fix: 5 worker modules import SessionLocal and async_session_factory which were not exported from database.py. Added aliases pointing to async_session. This fixes runtime crashes in: - follow_up_tasks.py - message_tasks.py - notification_tasks.py - affiliate_tasks.py - sequence_tasks.py https://claude.ai/code/session_01LsnvBa7HwF5hs99VZbgLGj
This commit is contained in:
parent
d7a5af9156
commit
b4a46076fc
@ -39,6 +39,10 @@ else:
|
|||||||
|
|
||||||
async_session = async_sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)
|
async_session = async_sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)
|
||||||
|
|
||||||
|
# Aliases for backward compatibility with workers
|
||||||
|
SessionLocal = async_session
|
||||||
|
async_session_factory = async_session
|
||||||
|
|
||||||
|
|
||||||
class Base(DeclarativeBase):
|
class Base(DeclarativeBase):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user