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()
|
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()
|
await redis.quit()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
||||||
|
|
||||||
console.log('cacheSize: ', cacheLength)
|
console.log('cacheSize: ', cacheLength)
|
||||||
|
|
||||||
|
await loadSchedulesCache()
|
||||||
|
|
||||||
if (cacheLength == 0) {
|
if (cacheLength == 0) {
|
||||||
console.log('Loading from cache...')
|
console.log('Loading from cache...')
|
||||||
await flushCache()
|
await flushCache()
|
||||||
|
@ -34,7 +36,7 @@ export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// await loadWhatsappCache()
|
// await loadWhatsappCache()
|
||||||
await loadSchedulesCache()
|
|
||||||
|
|
||||||
createSessionDir()
|
createSessionDir()
|
||||||
delRestoreControllFile()
|
delRestoreControllFile()
|
||||||
|
|
Loading…
Reference in New Issue