Skip to content

Commit

Permalink
Store progress and profile events on INSERTs
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Dec 13, 2023
1 parent 3452ffc commit 18cdf29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions clickhouse_driver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def receive_end_of_query(self):
break

elif packet.type == ServerPacketTypes.PROGRESS:
continue
self.last_query.store_progress(packet.progress)

elif packet.type == ServerPacketTypes.EXCEPTION:
raise packet.exception
Expand All @@ -682,7 +682,7 @@ def receive_end_of_query(self):
pass

elif packet.type == ServerPacketTypes.PROFILE_EVENTS:
pass
self.last_query.store_profile(packet.profile_info)

else:
message = self.connection.unexpected_packet_message(
Expand All @@ -702,7 +702,7 @@ def receive_end_of_insert_query(self):
log_block(packet.block)

elif packet.type == ServerPacketTypes.PROGRESS:
continue
self.last_query.store_progress(packet.progress)

elif packet.type == ServerPacketTypes.EXCEPTION:
raise packet.exception
Expand All @@ -725,6 +725,7 @@ def receive_profile_events(self):
packet = self.connection.receive_packet()

if packet.type == ServerPacketTypes.PROFILE_EVENTS:
self.last_query.store_profile(packet.profile_info)
break

elif packet.type == ServerPacketTypes.PROGRESS:
Expand Down

0 comments on commit 18cdf29

Please sign in to comment.