Skip to content

Commit

Permalink
Further adjust messaging timeout
Browse files Browse the repository at this point in the history
The message subscription timeout is now configured as
BOPTEST_MESSAGE_TIMEOUT + 60 seconds
  • Loading branch information
kbenne committed Sep 17, 2024
1 parent 247f794 commit 59dd9d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2
0.4.3
9 changes: 7 additions & 2 deletions web/server/src/lib/messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ import { pack, unpack } from 'msgpackr'

class Messaging {
constructor() {
this.subTimeoutTime = 600000
this.responseTimeoutTime = Number(
const timeout = Number(
process.env.BOPTEST_MESSAGE_TIMEOUT
? process.env.BOPTEST_MESSAGE_TIMEOUT
: "1200000", // Default 20 minute message timeout
);

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

Expand Down

0 comments on commit 59dd9d5

Please # to comment.