Skip to content

Commit

Permalink
Fix conversation status pooling logic
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Dec 13, 2023
1 parent 690f8ab commit 061bc10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/webSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ async function checkTeamStatus(context, socket, team_id, conv_id, chat_id) {
break;
}
}
// Add a 1-second delay before the next iteration
await new Promise((resolve) => setTimeout(resolve, 1000));
}
// Call another function after breaking the loop
await updateConversationsInDb(context, socket, json, conv_id, chat_id);
Expand Down

0 comments on commit 061bc10

Please sign in to comment.