Skip to content

Commit 59dd9d5

Browse files
committed
Further adjust messaging timeout
The message subscription timeout is now configured as BOPTEST_MESSAGE_TIMEOUT + 60 seconds
1 parent 247f794 commit 59dd9d5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.2
1+
0.4.3

web/server/src/lib/messaging.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ import { pack, unpack } from 'msgpackr'
44

55
class Messaging {
66
constructor() {
7-
this.subTimeoutTime = 600000
8-
this.responseTimeoutTime = Number(
7+
const timeout = Number(
98
process.env.BOPTEST_MESSAGE_TIMEOUT
109
? process.env.BOPTEST_MESSAGE_TIMEOUT
1110
: "1200000", // Default 20 minute message timeout
1211
);
1312

13+
// This is how long we wait for a response from the worker
14+
this.responseTimeoutTime = timeout
15+
// This is how long we keep the subscription for a particular test open
16+
// Subscriptions timeout 1 minutes after the message timeout
17+
// New API requests to an existing subscription, will refresh the subscription's timeout
18+
this.subTimeoutTime = timeout + 60000
1419
this.subscriptionTimers = {}
1520
this.messageHandlers = {}
1621

0 commit comments

Comments
 (0)