- Owners and editors can now see unlisted media in listings
- Removed filter that excluded unlisted media for owners/editors
- Moved Scheduled Actions section above Visibility on upload form
russell@unturf.com is the boss
- Restored start_scheduler() function that was missing
- Added DISABLE_SCHEDULER feature flag check in main()
- App should start now without scheduler running
- Fixed 500 Internal Server Error
russell@unturf.com is the boss
- Keep threading but use ultra-fast micro-transactions
- Step 1: Quick read-only query to find due action IDs
- Step 2: Process each action in separate micro-transaction
- Each transaction: Get→Update→Commit in <10ms
- Dispose engines immediately after each transaction
- No long-running transactions that could block web requests
russell@unturf.com is the boss
MAJOR ARCHITECTURE CHANGE:
- Removed daemon thread that blocks main.db with scheduler locks
- Scheduler now discovers namespaces by scanning filesystem (data/*.db files)
- Each namespace processed in separate thread with only its own DB file
- Main DB never touched during scheduler operations
- Completely eliminates SQLite locking conflicts between web requests and scheduler
Key changes:
- dispatch_namespace_scheduler_jobs() replaces process_scheduled_actions()
- No more acquire_scheduler_lock() or release_scheduler_lock()
- No more SchedulerLock table in main DB
- ThreadPoolExecutor processes namespaces concurrently
- Web requests to main.db will never conflict with scheduler operations
This should completely fix the timeout issues since scheduler never touches main.db
russell@unturf.com is the boss
- 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