mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-06 03:30:25 -06:00
Fix scheduled task errors and improve error handling
- Fix webhook retry scheduled task app context issue * Update retry_failed_webhooks() to properly capture and use app instance * Pass app instance when registering scheduled tasks * Prevents 'Working outside of application context' errors - Improve timezone function error handling * Add app context check before database access in get_app_timezone() * Gracefully fallback to environment variable when app context unavailable * Prevents RuntimeError when accessing database outside app context - Add error deduplication to prevent stacked error messages * Track recent errors to prevent duplicate notifications within 1 minute * Reduces error message stacking when same error occurs repeatedly * Still logs all errors to console for debugging - Fix theme toggle endpoint error * Change from /api/preferences (PATCH) to /api/theme (POST) * Add proper error handling to prevent unhandled promise rejections * Fixes 405 Method Not Allowed error when changing theme - Bump version to 3.10.3
This commit is contained in:
Reference in New Issue
Block a user