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

Make process_image and retransfer_images scripts touch the obs when thumb image is transferred #2126

Merged
merged 3 commits into from
May 2, 2024

Conversation

nimmolo
Copy link
Contributor

@nimmolo nimmolo commented May 2, 2024

We seem to have obs matrix_boxes that have been cached with a blank image. My working hypothesis is that the image was not done transferring to the image server at the moment where the cache was first created.

This PR changes the image transfer scripts to touch the obs when transfer is done, thereby invalidating the cache and forcing a new one. Hopefully that resolves the blank image issue.

TODO in a later PR: redo the image scripts as a queued job.

@nimmolo nimmolo requested a review from mo-nathan May 2, 2024 03:25
@coveralls
Copy link
Collaborator

coveralls commented May 2, 2024

Coverage Status

coverage: 94.446%. remained the same
when pulling 8e95fb9 on nimmo-touch-obs-on-image-transferred
into 40c4cd3 on main.

@nimmolo
Copy link
Contributor Author

nimmolo commented May 2, 2024

Hm. On one of the CI tests (only push!), the obs actually seems to get touched by the image transfer script.

Progress: |========================================= FAIL ReportTest#test_darwin_observations (158.91s)
        --- expected
        +++ actual
        @@ -1 +1 @@
        -["1046914674", "https://mushroomobserver.org/1046914674", "HumanObservation", "2006-05-12 17:21:00 UTC", "MushroomObserver", nil, "Fungi", nil, "Kingdom", "Fungi", nil, nil, "Mary Newbie", "2006-05-11", "2006", "5", "11", "USA", "California", nil, "Burbank", "34.185", "-118.33", "148", "294", "Found in a strange place... & with śtrangè characters™"]
        +["1046914674", "https://mushroomobserver.org/1046914674", "HumanObservation", "2024-05-02 03:31:01 UTC", "MushroomObserver", nil, "Fungi", nil, "Kingdom", "Fungi", nil, nil, "Mary Newbie", "2006-05-11", "2006", "5", "11", "USA", "California", nil, "Burbank", "34.185", "-118.33", "148", "294", "Found in a strange place... & with śtrangè characters™"]

Changing the test to expect the fixture's current updated_at time, rather than the original updated_at, clears the error.

@nimmolo

This comment was marked as outdated.

@nimmolo nimmolo marked this pull request as ready for review May 2, 2024 05:51
@nimmolo nimmolo merged commit 4fdecb5 into main May 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants