mirror of
https://github.com/sassanix/Warracker.git
synced 2026-01-07 06:00:13 -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
36 lines
1.4 KiB
JavaScript
36 lines
1.4 KiB
JavaScript
// Debug script to test i18next CDN loading
|
|
console.log('=== i18next Debug Script ===');
|
|
|
|
// Check if CDN scripts are loaded
|
|
setTimeout(() => {
|
|
console.log('Checking i18next libraries:');
|
|
console.log('- i18next:', typeof i18next !== 'undefined' ? 'LOADED' : 'NOT LOADED');
|
|
console.log('- i18nextHttpBackend:', typeof i18nextHttpBackend !== 'undefined' ? 'LOADED' : 'NOT LOADED');
|
|
console.log('- i18nextBrowserLanguageDetector:', typeof i18nextBrowserLanguageDetector !== 'undefined' ? 'LOADED' : 'NOT LOADED');
|
|
|
|
// Test basic fetch to translation file
|
|
fetch('/locales/en/translation.json')
|
|
.then(response => {
|
|
console.log('Translation file fetch status:', response.status);
|
|
return response.json();
|
|
})
|
|
.then(data => {
|
|
console.log('Translation file loaded successfully, keys:', Object.keys(data).slice(0, 5));
|
|
})
|
|
.catch(error => {
|
|
console.error('Failed to load translation file:', error);
|
|
});
|
|
|
|
// Test API endpoint
|
|
fetch('/api/locales')
|
|
.then(response => {
|
|
console.log('Locales API status:', response.status);
|
|
return response.json();
|
|
})
|
|
.then(data => {
|
|
console.log('Locales API response:', data);
|
|
})
|
|
.catch(error => {
|
|
console.error('Failed to load locales API:', error);
|
|
});
|
|
}, 2000); // Wait 2 seconds for CDN scripts to load
|