small exists_worker_with_tag nit

This commit is contained in:
Ruben Fiszel
2024-03-06 15:57:48 +01:00
parent f4fd7afbb3
commit 3ba9aa4e35

View File

@@ -13,9 +13,11 @@
try {
const existsWorkerWithTag = await WorkerService.existsWorkerWithTag({ tag })
noWorkerWithTag = !existsWorkerWithTag
timeout = setTimeout(() => {
lookForTag()
}, 1000)
if (noWorkerWithTag) {
timeout = setTimeout(() => {
lookForTag()
}, 1000)
}
} catch (err) {
console.error(err)
}