Skip to content

Commit

Permalink
remove debug from ob_recon
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzverev committed Sep 29, 2023
1 parent d2cf824 commit 7be1e71
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions recon_lw/recon_ob.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ def process_operations_batch(operations_batch, events, book_id, book, check_book
event_sequence, parent_event, log_books_filter, log_books_collection,
aggregate_batch_updates):
obs = []
debug_event = recon_lw.create_event("ROBDebug:" + parent_event["eventName"], "ROBDebug",
event_sequence,
ok=False,
body={"book_id": book_id,
"operations": [elem[0].__name__ for elem in
operations_batch],
"times": [elem[1]["str_time_of_event"] for elem in
operations_batch]},
parentId=parent_event["eventId"])
events.append(debug_event)
#debug_event = recon_lw.create_event("ROBDebug:" + parent_event["eventName"], "ROBDebug",
# event_sequence,
# ok=False,
# body={"book_id": book_id,
# "operations": [elem[0].__name__ for elem in
# operations_batch],
# "times": [elem[1]["str_time_of_event"] for elem in
# operations_batch]},
# parentId=parent_event["eventId"])
#events.append(debug_event)

for operation, parameters, mess in operations_batch:
initial_book = copy.deepcopy(book)
Expand Down Expand Up @@ -91,25 +91,25 @@ def process_operations_batch(operations_batch, events, book_id, book, check_book
if not r["successful"]:
r["body"]["operation_params"] = initial_parameters
r["body"]["initial_book"] = initial_book
r["body"]["operation"] = operation.__name__
r["body"]["book_id"] = book_id
r["parentEventId"] = parent_event["eventId"]
r["attachedMessageIds"] = [mess["messageId"]]
events.append(r)

dbg_event = recon_lw.create_event("DebugEvent",
"DebugEvent",
event_sequence,
ok=True,
body={"operations": [(op[0], op[2]["messageId"]) for op in
operations_batch],
"len(batch)": len(operations_batch),
"len(obs)": len(obs),
"book_id": book_id},
parentId=parent_event["eventId"])
for tupl in operations_batch:
dbg_event["attachedMessageIds"].append(tupl[2]["messageId"])
events.append(dbg_event)
r["body"]["operation"] = operation.__name__
r["body"]["book_id"] = book_id
r["parentEventId"] = parent_event["eventId"]
r["attachedMessageIds"] = [mess["messageId"]]
events.append(r)

#dbg_event = recon_lw.create_event("DebugEvent",
# "DebugEvent",
# event_sequence,
# ok=True,
# body={"operations": [(op[0], op[2]["messageId"]) for op in
# operations_batch],
# "len(batch)": len(operations_batch),
# "len(obs)": len(obs),
# "book_id": book_id},
# parentId=parent_event["eventId"])
#for tupl in operations_batch:
# dbg_event["attachedMessageIds"].append(tupl[2]["messageId"])
#events.append(dbg_event)

# update otv (order time version)
orders_versions = {}
Expand Down

0 comments on commit 7be1e71

Please sign in to comment.