fix: await race promise

This commit is contained in:
Elias Renman
2023-06-18 12:15:45 +02:00
parent a2cb9287da
commit 7db07104ec

View File

@@ -29,7 +29,7 @@ async function process(row: MositureRow) {
// Enable water gate
await toggleWater(index, true);
// Check moisture level once per second for configured time
Promise.race([
await Promise.race([
sleep(config.config.timeout * 1000),
timeoutCb(row.name, row.value.toNumber()),
]);