Skip to content

Commit

Permalink
Merge pull request #990 from biomage-org/fix-worker-messages
Browse files Browse the repository at this point in the history
Fix worker UI report messages
  • Loading branch information
saracastel authored Mar 7, 2024
2 parents 690a933 + e173626 commit d7d3696
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/utils/work/waitForWorkRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,18 @@ const waitForWorkRequest = async (
// the worker is alive and was working on another request of our experiment
io.on(`Heartbeat-${experimentId}`, (message) => {
const newTimeoutDate = getTimeoutDate(timeout);
if (newTimeoutDate < workerTimeoutDate) {
const status = {
worker: {
statusCode: message.status_code,
userMessage: message.user_message,
},
};
dispatch(updateBackendStatus(experimentId, status));

if (newTimeoutDate < workerTimeoutDate) {
setOrRefreshTimeout(request, timeout, reject, ETag);
}

const status = {
worker: {
statusCode: message.status_code,
userMessage: message.user_message,
},
};
dispatch(updateBackendStatus(experimentId, status));
});
});

Expand Down

0 comments on commit d7d3696

Please sign in to comment.