Skip to content

Commit

Permalink
increase interval to every 15 minutes, but collect 450 instead of 300…
Browse files Browse the repository at this point in the history
… photo's metadata in one run
  • Loading branch information
m-p-esser committed Sep 17, 2023
1 parent 41fea2a commit 6056814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion make/03_deploy_flow.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ deploy-ingest-photos-gcs: ## Deploy Ingest Topic GCS Flow as Google Cloud Run
--output deployments/ingest-topics-gcs-${ENV}-deployment.yaml \
--pool ${ENV}-cloud-run-push-work-pool \
--params='{"gcp_credential_block_name": "unsplash-photo-trends-deployment-sa"}' \
--cron "*/12 * * * *" \
--cron "*/15 * * * *" \
--timezone 'Europe/Berlin' \
--apply

Expand Down
6 changes: 3 additions & 3 deletions src/prefect/ingest_photos_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ def ingest_photos_gcs(gcp_credential_block_name: str):
)
break

# Break the Loop if 300 images have been collected to avoid "OSError: [Errno 24] Too many open files"
if number_stored_images == 300:
# Break the Loop if 450 images have been collected to avoid "OSError: [Errno 24] Too many open files"
if number_stored_images == 450:
logger.info(
"Downloaded metadata for 300 Editorial images of Unsplash platform"
"Downloaded metadata for 450 Editorial images of Unsplash platform"
)
break

Expand Down

0 comments on commit 6056814

Please sign in to comment.