Skip to content

Commit

Permalink
calculate length of list
Browse files Browse the repository at this point in the history
  • Loading branch information
m-p-esser committed Oct 3, 2023
1 parent 25b7994 commit f5eec00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prefect/ingest_photos_expanded_napi_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ def ingest_photos_expanded_napi_gcs(
for i in range(0, len(remaining_photo_ids), batch_size)
]

if remaining_photo_ids == 0:
if len(remaining_photo_ids) == 0:
logger.info(f"Job finished")
logger.info(
f"All ({total_record_size}) metadata (and log) records written to Bigquery"
)

while remaining_photo_ids > 0 and total_records_written < total_record_size:
while len(remaining_photo_ids) > 0 and total_records_written < total_record_size:
# Request and write data
total_records_written = 0

Expand Down

0 comments on commit f5eec00

Please sign in to comment.