Skip to content

Commit

Permalink
fix(requester): filter count event result to current dm
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-buiquang authored Aug 30, 2024
1 parent 6ae5a86 commit a4024b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CreationCohort/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ const ControlPanel: React.FC<{
useEffect(() => {
const listener = (message: WebSocketMessage) => {
let response = {}
if (message.status !== WebSocketJobStatus.pending) {
if (message.status !== WebSocketJobStatus.pending && message.uuid === count.uuid) {
setCountLoading(LoadingStatus.SUCCESS)
response = {
includePatient: message.extra_info?.measure,
status: message.status,
jobFailMsg: message.extra_info?.request_job_fail_msg
}
dispatch(updateCount(response))
}
dispatch(updateCount(response))
}

webSocketContext?.addListener(listener)
Expand Down

0 comments on commit a4024b2

Please sign in to comment.