clear ungraceful timer discord notify
All checks were successful
Build and push image for doorman-homeassistant / docker (push) Successful in 48s
Build and push Doorman UI / API / docker (push) Successful in 1m16s
Build and push image for doorman-homeassistant / deploy-gitainer (push) Successful in 22s

This commit is contained in:
Martin Dimitrov 2024-11-11 20:13:36 -08:00
parent 3f7233698a
commit 9337846ad0

View File

@ -43,11 +43,12 @@ exports.handler = async function(context, event, callback) {
return callback(null, response); return callback(null, response);
} }
setTimeout(() => { let timer = setTimeout(() => {
console.log("Ungraceful finish: running out of time"); console.log("Ungraceful finish: running out of time");
callback(null, response); callback(null, response);
}, 9500); }, 9500);
await Promise.all(promises); await Promise.all(promises);
clearTimeout(timer);
return callback(null, response); return callback(null, response);
}; };