Skip to content

Commit

Permalink
move timeout constant
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomourar committed Jun 10, 2020
1 parent 31de526 commit 6bb46ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ export const WAITER_STATE_MACHINE_ARN_ENV = 'WAITER_STATE_MACHINE_ARN';
export const FRAMEWORK_ON_EVENT_HANDLER_NAME = 'onEvent';
export const FRAMEWORK_IS_COMPLETE_HANDLER_NAME = 'isComplete';
export const FRAMEWORK_ON_TIMEOUT_HANDLER_NAME = 'onTimeout';
export const FRAMEWORK_HANDLER_TIMEOUT = 900000; // 15 minutes
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import * as AWS from 'aws-sdk';
// eslint-disable-next-line import/no-extraneous-dependencies
import { ConfigurationOptions } from 'aws-sdk/lib/config';
import * as https from 'https';
import * as consts from './consts';

const FRAMEWORK_HANDLER_TIMEOUT = 900000; // 15 minutes

// In order to honor the overall maximum timeout set for the target process,
// the default 2 minutes from AWS SDK has to be overriden:
// https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#httpOptions-property
const awsSdkConfig: ConfigurationOptions = {
httpOptions: { timeout: consts.FRAMEWORK_HANDLER_TIMEOUT },
httpOptions: { timeout: FRAMEWORK_HANDLER_TIMEOUT },
};

async function defaultHttpRequest(options: https.RequestOptions, responseBody: string) {
Expand Down

0 comments on commit 6bb46ee

Please sign in to comment.