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

Update collect_weather worker re: changes in watchdog=2.1.7 #168

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

douglatornell
Copy link
Member

Mostly change how the watchdog observer thread is controlled re: checking if all of the expected files have been downloaded. This fixes the problem of the worker not collecting files that arose after the change to the HRDPS continental grid.

Also drop some no longer necessary os.fspath() calls.

Replace the time.sleep(1) in the watchdog observer loop that collects
the expected files with joining the observer thread with a 1-second
timeout.

We need to have a timeout on the observer thread so that the status
of the expected files set gets checked, otherwise the worker never
finishes because the main thread is blocked by the observer thread.

I'm not really sure why this change is necessary, but it fixes the
problem of the worker not collecting files after the change to the
HRDPS continental grid.
watchdog and shutil.move() can now handle pathlib.Path objects.
@douglatornell douglatornell added bug Something isn't working enhancement New feature or request Workers labels Mar 21, 2023
@douglatornell douglatornell added this to the v23.1 milestone Mar 21, 2023
@douglatornell douglatornell merged commit aac2da9 into main Mar 21, 2023
@douglatornell douglatornell deleted the watchdog-2.1.7 branch March 21, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Workers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant