revert the previous revert and make discord timeout within the twilio function
All checks were successful
Build and push image for doorman-homeassistant / docker (push) Successful in 39s
Build and push Doorman UI / API / docker (push) Successful in 1m21s
Build and push image for doorman-homeassistant / deploy-gitainer (push) Successful in 1m13s

This commit is contained in:
Martin Dimitrov 2024-10-27 12:19:08 -07:00
parent 00491528ee
commit aeb936938e
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ exports.getDiscordClient = async (context) => {
const client = new Client({
intents: [GatewayIntentBits.DirectMessages],
rest: {
timeout: 60_000, // 1 minute
timeout: 8_000, // 8s
}
});

View File

@ -142,7 +142,7 @@ exports.handler = async function(context, event, callback) {
const twiml = await Promise.race([unlockPromise, gracefulFallbackPromise, ungracefulFallbackPromise]);
console.log(invokeId, "Race ended, clearing residual timers");
// timeouts.forEach(timeout => clearTimeout(timeout));
// intervals.forEach(interval => clearInterval(interval));
timeouts.forEach(timeout => clearTimeout(timeout));
intervals.forEach(interval => clearInterval(interval));
callback(null, twiml);
};