Skip to content

Commit

Permalink
chg: [MAS] Removed use;ess octet stream header.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Dec 19, 2023
1 parent 5f39075 commit e760e10
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scandale/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ async def on_start(self):
"Content-Type": "application/json",
"accept": "application/json",
}
self.headers_octet_stream = {
"Content-Type": "application/octet-stream",
}

async def run(self):
msg = await self.receive(timeout=10) # wait for a message for 10 seconds
msg = await self.receive(timeout=10) # Wait for a message for 10 seconds
if msg:
print(f"Message received with content: {msg.body}")
try:
# Convert the JSON message message to a JSON object
# Convert the JSON string to a JSON object
dict_msg = json.loads(msg.body)
# Validate the format with pydantic
# Validate the format with Pydantic
ScanDataCreate(**dict_msg)
except json.decoder.JSONDecodeError:
return
Expand Down

0 comments on commit e760e10

Please sign in to comment.