Skip to content

Commit

Permalink
fix: give stream lambda timeout grace period
Browse files Browse the repository at this point in the history
  • Loading branch information
mvayngrib committed Sep 10, 2018
1 parent ae05f13 commit 8837bff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lambda/onresourcestream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down

0 comments on commit 8837bff

Please sign in to comment.