fix: bad caching query crashing our db (#2172)

* logs: add errors to cache log

* logs: add errors to cache log

* fix: bad caching query crashing our db
This commit is contained in:
Daniel Salazar
2025-12-13 16:48:36 -08:00
committed by GitHub
parent 5c9a98a7a1
commit 25221e539d

View File

@@ -63,39 +63,28 @@ class AppInformationService extends BaseService {
}
async '__on_boot.consolidation' () {
(async () => {
try {
ENABLE_REFRESH_APP_CACHE && await this._refresh_app_cache();
await this._refresh_app_stats();
await this._refresh_recent_cache();
} catch (e) {
console.error('Some app cache portion failed to populate:', e);
}
ENABLE_REFRESH_APP_CACHE && setInterval(async () => {
try {
await this._refresh_app_cache();
} catch (e) {
console.error('App cache failed to update:', e);
}
}, 30 * 1000);
setInterval(async () => {
try {
ENABLE_REFRESH_APP_CACHE && await this._refresh_app_cache();
await this._refresh_app_stats();
await this._refresh_app_stat_referrals();
await this._refresh_recent_cache();
} catch (e) {
console.error('Some app cache portion failed to populate:', e);
console.error('App stats cache failed to update:', e);
}
ENABLE_REFRESH_APP_CACHE && setInterval(async () => {
try {
await this._refresh_app_cache();
} catch (e) {
console.error('App cache failed to update:', e);
}
}, 30 * 1000);
setInterval(async () => {
try {
await this._refresh_app_stats();
await this._refresh_recent_cache();
} catch (e) {
console.error('App stats cache failed to update:', e);
}
}, 4 * 60 * 1000);
setInterval(async () => {
try {
await this._refresh_app_stat_referrals();// trying this to have both hit less often
} catch (e) {
console.error('App referral cache failed to update', e);
}
}, 10.5 * 60 * 1000);
})();
}, 4 * 60 * 1000);
}
/**