Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for index swap before sending BS alerts #320

Open
nickdos opened this issue Oct 23, 2024 · 0 comments
Open

Wait for index swap before sending BS alerts #320

nickdos opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
Biosecurity Alerts for biosecurity species enhancement

Comments

@nickdos
Copy link
Contributor

nickdos commented Oct 23, 2024

For consideration/evaluation only

Following a discussion about the issue of iNat images not always appearing in BS emails, it was suggested that the code perform a check against image-service and biocache before proceeding to sending the emails. If the check fails, then the job is delayed an hour and the check is re-run. If it fails more than (say) 5 times, then it should "fail out" and no email will be sent until the next scheduled run (1 week). Optionally sending an email to an admin saying the job was cancelled due to images not being avilable.

Suggested checks:

  1. Check image loading has finished via https://images.ala.org.au/ws/batch/dataresource/dr1411 (not needed?)
  2. Send a query to the image-service for the most recently added image from iNat (DR1411), saving the UUID for that image. The creation date for the image should be in the last 5 days (sub check?)
  3. Send a query to biocache-ws with the image UUID. If no results, then sleep for 1 hour and try again then. If a record is returned, then proceed with the biosecurity alerts.
@nickdos nickdos added enhancement Biosecurity Alerts for biosecurity species labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Biosecurity Alerts for biosecurity species enhancement
Projects
None yet
Development

No branches or pull requests

2 participants