Skip to content

Commit

Permalink
New publisher for archive sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Drobena committed Mar 12, 2024
1 parent 0c54566 commit c7e5981
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ccx_messaging/publishers/idp_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ class IDPPublisher(KafkaPublisher):

def publish(self, input_msg: Dict, report: str) -> None:
"""Publish response as Kafka message to outgoing topic."""
output_msg = {}
try:
output_msg = json.loads(report)
except (TypeError, json.decoder.JSONDecodeError) as err:
raise CCXMessagingError("Could not parse report; report is not in JSON format") from err
output_msg = json.loads(report)
output_msg.pop("reports", None)
message = json.dumps(output_msg) + "\n"

Expand Down

0 comments on commit c7e5981

Please sign in to comment.