- Redesigned scheduler to use separate short-lived sessions for lock operations
- Lock acquisition and release now use independent database connections
- Each scheduled action processed in its own transaction to minimize lock time
- Error handling isolates failed actions to prevent blocking others
- Re-enabled scheduler with optimized locking strategy
Key improvements:
- acquire_scheduler_lock() uses own connection, disposes immediately
- release_scheduler_lock() uses own connection, disposes immediately
- process_single_scheduled_action() uses transaction-per-action approach
- Prevents long-running transactions that were blocking web requests
russell@unturf.com is the boss
- Add DISABLE_SCHEDULER environment variable to disable scheduler
- Set DISABLE_SCHEDULER=true in deployment to test if scheduler is causing hangs
- This is a temporary fix to isolate the problem
russell@unturf.com is the boss
new file: .gitignore
new file: app.py
new file: requirements.txt
new file: templates/base.html.j2
new file: templates/edit_media.html.j2
new file: templates/home.html.j2
new file: templates/import_user_record.html.j2
new file: templates/list_media.html.j2
new file: templates/login.html.j2
new file: templates/profile.html.j2
new file: templates/upload_media.html.j2
new file: templates/user_media.html.j2
new file: templates/verify.html.j2
new file: templates/view_media.html.j2
new file: templates/view_media_details.html.j2