mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
- Create session_decorator.py with @with_session decorator - Decorator automatically manages database sessions for worker tasks - Ensures session stays open for entire task execution - Fixes issue where sessions were closed before being used (e.g., process_meetings) Applied decorator to all worker tasks: - process.py: process_recording, process_meetings, reprocess_failed_recordings - cleanup.py: cleanup_old_public_data_task - ics_sync.py: sync_room_ics, sync_all_ics_calendars, create_upcoming_meetings Benefits: - Consistent session management across all worker tasks - No more manual session_factory context management in tasks - Proper transaction boundaries with automatic begin/commit - Cleaner, more maintainable code - Fixes session lifecycle issues in process_meetings