diff --git a/backend/src/helpers/SchedulingNotifyCache.ts b/backend/src/helpers/SchedulingNotifyCache.ts index baacb5c..ef13826 100644 --- a/backend/src/helpers/SchedulingNotifyCache.ts +++ b/backend/src/helpers/SchedulingNotifyCache.ts @@ -111,7 +111,7 @@ async function searchScheduleCache(date: string, hour: number | string, minute: date = escapeCharCache(date).trim() - const response: any = await redis.call('FT.SEARCH', 'idx_schedule', `(@date_escaped:${date}) (@hour:${hour}) (@minute:${minute})`) + const response: any = await redis.call('FT.SEARCH', 'idx_schedule', `(@date_escaped:${date}) (@hour:${hour}) (@minute:${minute})`) await redis.quit() diff --git a/backend/src/services/WbotServices/StartAllWhatsAppsSessions.ts b/backend/src/services/WbotServices/StartAllWhatsAppsSessions.ts index 444c373..212c435 100644 --- a/backend/src/services/WbotServices/StartAllWhatsAppsSessions.ts +++ b/backend/src/services/WbotServices/StartAllWhatsAppsSessions.ts @@ -26,6 +26,8 @@ export const StartAllWhatsAppsSessions = async (): Promise => { console.log('cacheSize: ', cacheLength) + await loadSchedulesCache() + if (cacheLength == 0) { console.log('Loading from cache...') await flushCache() @@ -34,7 +36,7 @@ export const StartAllWhatsAppsSessions = async (): Promise => { } // await loadWhatsappCache() - await loadSchedulesCache() + createSessionDir() delRestoreControllFile()