Skip to content

Commit

Permalink
Do not retrieve related frames from archive API response
Browse files Browse the repository at this point in the history
This is to speed up and make more robust the serialization of frames endpoint responses, particularly for BPMs which have many thousands of related frames.
  • Loading branch information
mgdaily committed Oct 7, 2024
1 parent 8078119 commit 710258b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions banzai/utils/fits_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ def download_from_s3(file_info, context, is_raw_frame=False):
'attempt_number': download_from_s3.retry.statistics['attempt_number']})

if is_raw_frame:
url = f'{context.RAW_DATA_FRAME_URL}/{frame_id}'
url = f'{context.RAW_DATA_FRAME_URL}/{frame_id}/?include_related_frames=false'
archive_auth_header = context.RAW_DATA_AUTH_HEADER
else:
url = f'{context.ARCHIVE_FRAME_URL}/{frame_id}'
url = f'{context.ARCHIVE_FRAME_URL}/{frame_id}/?include_related_frames=false'
archive_auth_header = context.ARCHIVE_AUTH_HEADER
response = requests.get(url, headers=archive_auth_header).json()
buffer = io.BytesIO()
Expand Down

0 comments on commit 710258b

Please sign in to comment.