Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bonk1t committed Dec 19, 2023
1 parent c274dc8 commit 3cc7fd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nalgonda/routers/v1/api/agency.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async def post_agency_message(request: AgencyMessagePostRequest) -> dict:

new_thread_id = await agency_manager.refresh_thread_id(agency, agency_id, thread_id)
if new_thread_id is not None:
logger.info(f"Thread ID changed from {thread_id} to {new_thread_id}")
return {"response": response, "thread_id": new_thread_id}

return {"response": response}
Expand Down
1 change: 1 addition & 0 deletions nalgonda/routers/v1/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ async def websocket_receive_and_process_messages(

new_thread_id = await agency_manager.refresh_thread_id(agency, agency_id, thread_id)
if new_thread_id is not None:
logger.info(f"Thread ID changed from {thread_id} to {new_thread_id}")
await connection_manager.send_message(json.dumps({"thread_id": new_thread_id}), websocket)
thread_id = new_thread_id

Expand Down

0 comments on commit 3cc7fd6

Please sign in to comment.