Skip to content

Commit

Permalink
Add docs for #121.
Browse files Browse the repository at this point in the history
  • Loading branch information
sampottinger committed Jan 8, 2025
1 parent cc3bd7d commit c30cd37
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions afscgap/flat_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ def determine_matching_hauls_from_index(options: typing.Iterable[dict],


def get_complete(iterator, url: str) -> typing.List[dict]:
"""Get the complete payload from an Avro iterator.
Get the complete payload from an Avro iterator to avoid issues with streaming interruption on
weaker connections.
Args:
iterator: The iterator over Avro files read from the stream.
url: The URL at which the Avro payload was found.
Returns:
Iterable over the parsed Avro records.
"""
try:
return list(iterator)
except e:
Expand Down

0 comments on commit c30cd37

Please sign in to comment.