Skip to content

Commit

Permalink
writer: check status of HTTP data request
Browse files Browse the repository at this point in the history
  • Loading branch information
eldargab committed Mar 10, 2024
1 parent 6fffe17 commit e7912fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqa/writer/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def ingest_from_service(
while data_range['from'] <= last_block:
try:
with httpx.stream('POST', service_url, json=data_range, timeout=httpx.Timeout(None)) as res:
res.raise_for_status()
for line in res.iter_lines():
block: Block = json.loads(line)
height = get_block_height(block)
Expand Down

0 comments on commit e7912fe

Please sign in to comment.