From 8837bff954ca7139293dd9e6548e98122ff2b516 Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Mon, 10 Sep 2018 17:15:35 -0400 Subject: [PATCH] fix: give stream lambda timeout grace period --- src/lambda/onresourcestream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lambda/onresourcestream.ts b/src/lambda/onresourcestream.ts index 5803a53d8..6a33b2822 100644 --- a/src/lambda/onresourcestream.ts +++ b/src/lambda/onresourcestream.ts @@ -59,11 +59,11 @@ const getBody = async (bot: Bot, item: any) => { logger: bot.logger, maxAttempts: 10, maxDelay: 2000, - timeout: 20000, + timeout: bot.env.getRemainingTimeWithBuffer(5000), initialDelay: 500, shouldTryAgain: err => { const willRetry = Errors.isNotFound(err) - bot.logger.warn(`can't find object with link ${item._link}`, { + bot.logger.error(`can't find object with link ${item._link}`, { error: Errors.export(err), willRetry, })