feat: start watching new achievements only after finishing sync

This commit is contained in:
Zamitto 2024-10-21 01:48:47 -03:00
parent bb65d77fc6
commit c6fda9b4d8
4 changed files with 109 additions and 98 deletions

View file

@ -1,7 +1,7 @@
import { sleep } from "@main/helpers";
import { DownloadManager } from "./download";
import { watchProcesses } from "./process-watcher";
import { watchAchievements } from "./achievements/achievement-watcher";
import { AchievementWatcherManager } from "./achievements/AchievementWatcherManager";
export const startMainLoop = async () => {
// eslint-disable-next-line no-constant-condition
@ -9,7 +9,7 @@ export const startMainLoop = async () => {
await Promise.allSettled([
watchProcesses(),
DownloadManager.watchDownloads(),
watchAchievements(),
AchievementWatcherManager.watchAchievements(),
]);
await sleep(1500);