Modificação ordem cache scheduling notify
parent
cdd07140a9
commit
10d15930da
|
@ -8,7 +8,7 @@ import Whatsapp from "../../models/Whatsapp";
|
||||||
import ListWhatsAppsService from "../WhatsappService/ListWhatsAppsService";
|
import ListWhatsAppsService from "../WhatsappService/ListWhatsAppsService";
|
||||||
import { StartWhatsAppSession } from "./StartWhatsAppSession";
|
import { StartWhatsAppSession } from "./StartWhatsAppSession";
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
||||||
import "../../helpers/SchedulingNotifySendMessage"
|
import "../../helpers/SchedulingNotifySendMessage"
|
||||||
import "../../helpers/WhoIsOnlineMonitor"
|
import "../../helpers/WhoIsOnlineMonitor"
|
||||||
|
|
||||||
|
@ -20,13 +20,13 @@ import { createSessionDir } from "../../helpers/CreateSessionDir";
|
||||||
|
|
||||||
let counter = 0
|
let counter = 0
|
||||||
|
|
||||||
export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
||||||
|
|
||||||
const cacheLength = await cacheSize()
|
const cacheLength = await cacheSize()
|
||||||
|
|
||||||
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...')
|
||||||
|
@ -34,9 +34,10 @@ export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
||||||
await loadContactsCache()
|
await loadContactsCache()
|
||||||
await loadTicketsCache()
|
await loadTicketsCache()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await loadSchedulesCache()
|
||||||
// await loadWhatsappCache()
|
// await loadWhatsappCache()
|
||||||
|
|
||||||
|
|
||||||
createSessionDir()
|
createSessionDir()
|
||||||
delRestoreControllFile()
|
delRestoreControllFile()
|
||||||
|
@ -107,6 +108,6 @@ export const StartAllWhatsAppsSessions = async (): Promise<void> => {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue