Skip to content

Commit

Permalink
fixed enrichment edge
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Dec 7, 2022
1 parent a1d5bc4 commit 9d78f53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/broadcast_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ void BroadcastServer::queue_telegram(const dvbdump::R09GrpcTelegram* telegram) n
enriched_telegram.set_train_length(telegram->train_length());
enriched_telegram.set_vehicle_number(telegram->vehicle_number());
enriched_telegram.set_operator_(telegram->operator_());

auto list_of_values = enriched_telegram.add_enriched();
list_of_values->set_historical_time(extracted.historical_time());
enriched_telegram.set_allocated_enriched(&extracted);
google::protobuf::util::MessageToJsonString(enriched_telegram, &enriched_serialized, options);
}

Expand Down
4 changes: 3 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ async def hello(uri):
async with connect(uri) as websocket:
await websocket.send(raw_config)
while True:
print(await websocket.recv())
data = json.loads(await websocket.recv())
if "enriched" in data.keys():
print(data["enriched"])

asyncio.run(hello("wss://socket.staging.dvb.solutions"))
#asyncio.run(hello("ws://127.0.0.1:9001"))

0 comments on commit 9d78f53

Please sign in to comment.