revert the previous revert and make discord timeout within the twilio function
This commit is contained in:
parent
00491528ee
commit
aeb936938e
@ -11,7 +11,7 @@ exports.getDiscordClient = async (context) => {
|
|||||||
const client = new Client({
|
const client = new Client({
|
||||||
intents: [GatewayIntentBits.DirectMessages],
|
intents: [GatewayIntentBits.DirectMessages],
|
||||||
rest: {
|
rest: {
|
||||||
timeout: 60_000, // 1 minute
|
timeout: 8_000, // 8s
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -142,7 +142,7 @@ exports.handler = async function(context, event, callback) {
|
|||||||
|
|
||||||
const twiml = await Promise.race([unlockPromise, gracefulFallbackPromise, ungracefulFallbackPromise]);
|
const twiml = await Promise.race([unlockPromise, gracefulFallbackPromise, ungracefulFallbackPromise]);
|
||||||
console.log(invokeId, "Race ended, clearing residual timers");
|
console.log(invokeId, "Race ended, clearing residual timers");
|
||||||
// timeouts.forEach(timeout => clearTimeout(timeout));
|
timeouts.forEach(timeout => clearTimeout(timeout));
|
||||||
// intervals.forEach(interval => clearInterval(interval));
|
intervals.forEach(interval => clearInterval(interval));
|
||||||
callback(null, twiml);
|
callback(null, twiml);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user