File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,8 @@ This application can be configured using the following environment variables:
13
13
- ` PING_INTERVAL ` : The interval of time in milliseconds where the ping to the MongoDB instance is done (default: ` "1000" ` )
14
14
- ` SLACK_TOKEN ` : The Slack token used to send messages to Slack (default: ` "secret-token" ` )
15
15
- ` SLACK_CHANNEL ` : The Slack channel where the messages will be sent (default: ` "mongo-alerts" ` )
16
+ - ` TIMEOUT ` : Timeout to perform MongoDB commands (in milliseconds) (default: ` "8000" ` )
17
+ - ` CONNECT_TIMEOUT ` : Timeout to connect to MongoDB (in milliseconds) (default: value of ` TIMEOUT ` )
18
+ - ` SOCKET_TIMEOUT ` : Timeout for MongoDB socket (in milliseconds) (default: value of ` TIMEOUT ` )
19
+ - ` WAIT_QUEUE_TIMEOUT ` : Timeout for MongoDB to get an available thread (in milliseconds) (default: value of ` TIMEOUT ` )
20
+ - ` MAX_IDLE_TIME ` : Timeout for MongoDB to close an idle connection (in milliseconds) (default: value of ` TIMEOUT ` )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const waitQueueTimeoutConfig = process.env.WAIT_QUEUE_TIMEOUT || timeoutConfig;
33
33
const waitQueueTimeout = parseInt ( waitQueueTimeoutConfig , 10 ) ;
34
34
35
35
// Configuration: timeout for MongoDB to close an idle connection (in milliseconds)
36
- const maxIdleTimeConfig = process . env . CONNECT_TIMEOUT || timeoutConfig ;
36
+ const maxIdleTimeConfig = process . env . MAX_IDLE_TIME || timeoutConfig ;
37
37
const maxIdleTime = parseInt ( maxIdleTimeConfig , 10 ) ;
38
38
39
39
const slackClient = new WebClient ( slackToken ) ;
You can’t perform that action at this time.
0 commit comments