Modificação na ordem de carregamento do cache
parent
522790901d
commit
cdd07140a9
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
|||
|
||||
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<void> => {
|
|||
}
|
||||
|
||||
// await loadWhatsappCache()
|
||||
await loadSchedulesCache()
|
||||
|
||||
|
||||
createSessionDir()
|
||||
delRestoreControllFile()
|
||||
|
|
Loading…
Reference in New Issue