mirror of
https://github.com/sassanix/Warracker.git
synced 2026-01-05 04:59:31 -06:00
Fixes & Enhancements * Resolved five critical Apprise notification issues: • Ensured configuration reload during scheduled jobs • Fixed warranty data fetching for Apprise-only users • Refactored notification dispatch logic with dedicated helpers • Corrected handler scoping via Flask app context • Wrapped scheduler jobs with Flask app context to prevent context errors → Verified: Scheduled Apprise notifications now work reliably for "Apprise only" and "Both" channels. * Added support for SMTP\_FROM\_ADDRESS environment variable, allowing sender address customization independent of SMTP username. (PR #115) * Fixed duplicate scheduled notifications in multi-worker environments: • Strengthened should\_run\_scheduler() logic • Now guarantees exactly one scheduler instance across all Gunicorn modes. * Fixed stale database connection handling in scheduled jobs: • Fresh connection acquired each run, properly released via try/finally • Eliminates "server closed the connection" errors. * Definitive scheduler logic fix for all memory modes (ultra-light, optimized, performance): • Single-worker runs scheduler if GUNICORN\_WORKER\_ID is unset • Multi-worker: only worker 0 runs scheduler. Impact * Apprise and Email notifications are now stable, reliable, and production-ready * No more duplicate or missed notifications across all memory modes * Improved system efficiency and robustness
28 lines
1.0 KiB
JavaScript
28 lines
1.0 KiB
JavaScript
// Temporary toast notification enhancement for debugging
|
|
// Add this to browser console to make success messages more visible
|
|
|
|
(function() {
|
|
console.log('🍞 Toast Debug Enhancement Loaded');
|
|
|
|
// Override showToast to make it more visible
|
|
const originalShowToast = window.showToast;
|
|
|
|
window.showToast = function(message, type = 'info', duration = 5000) {
|
|
console.log(`🍞 TOAST NOTIFICATION: ${message} (Type: ${type})`);
|
|
|
|
// Call original function
|
|
if (originalShowToast) {
|
|
originalShowToast.call(this, message, type, duration);
|
|
}
|
|
|
|
// Also show an alert for debugging (remove this in production)
|
|
if (type === 'success') {
|
|
alert(`SUCCESS: ${message}`);
|
|
}
|
|
|
|
// Add a visible console message
|
|
console.log(`%c${message}`, `color: ${type === 'success' ? 'green' : type === 'error' ? 'red' : 'blue'}; font-weight: bold; font-size: 16px;`);
|
|
};
|
|
|
|
console.log('Toast notifications will now be more visible with alerts');
|
|
})();
|