mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 19:45:11 +00:00
fix: CACHE IT DAMN IT
This commit is contained in:
parent
ff48b40256
commit
808aa35065
1 changed files with 2 additions and 0 deletions
|
|
@ -197,10 +197,12 @@ export async function cronForTrackingData(app: ModifiedApp) {
|
|||
for (const { flightId, userId } of IdsToTrack) {
|
||||
const flightD = await getFlightData(flightId);
|
||||
const changes = await detectChanges(flightD, app.dbs.flightly.get(userId));
|
||||
if(changes.length > 0){
|
||||
await app.client.chat.postMessage({
|
||||
channel: userId,
|
||||
text: changes.join("\n"),
|
||||
});
|
||||
}
|
||||
app.dbs.flightly.set(userId, flightD);
|
||||
await new Promise((r) => setTimeout(r, 1000));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue