Skip to content

Commit

Permalink
WIP: Add debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfang committed Feb 6, 2025
1 parent e067c61 commit 822261c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def make_fanned_out_messages(message: NextVisitModel,
raise UnsupportedMessageError(f"No matching case for HSC salIndex {message.salIndex}")
case instrument if instrument in instruments:
gauges[instrument].total_received.inc()
logging.debug(f"make_fanned_out_messages for {instrument}.")
return fan_out(message, instruments[instrument])
case _:
raise UnsupportedMessageError(f"no matching case for instrument {message.instrument}.")
Expand Down Expand Up @@ -357,6 +358,7 @@ def dispatch_fanned_out_messages(client: httpx.AsyncClient,
"source": topic,
}

logging.debug(f"Will send fan out messages")
for fan_out_message in send_info.fan_out_messages:
data = fan_out_message
data_json = json.dumps(data)
Expand Down

0 comments on commit 822261c

Please sign in to comment.