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:
Claude 2026-04-11 09:36:50 +00:00
parent d7a5af9156
commit b4a46076fc
No known key found for this signature in database

View File

@ -39,6 +39,10 @@ else:
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):
pass