feat: move sleep to end of function on process-watcher

This commit is contained in:
Zamitto 2024-05-01 19:11:05 -03:00
parent 7a1d0b2eaf
commit cfdd09d9ac

View File

@ -13,15 +13,13 @@ export const startProcessWatcher = async () => {
// eslint-disable-next-line no-constant-condition
while (true) {
await sleep(sleepTime);
const games = await gameRepository.find({
where: {
executablePath: Not(IsNull()),
},
});
if (games.length == 0) {
if (games.length === 0) {
continue;
}
@ -71,5 +69,7 @@ export const startProcessWatcher = async () => {
}
}
}
await sleep(sleepTime);
}
};