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

Skip watcher callbacks for FOVs that already have data generated #394

Merged
merged 17 commits into from
Jul 27, 2023

Conversation

alex-l-kong
Copy link
Contributor

What is the purpose of this PR?

Closes #346. If the watcher has to be stopped for some reason, currently all the FOVs need to be re-run regardless of whether they were already processed. Fixes this so the watcher skips these FOVs instead.

How did you implement your changes

Modify watcher_callbacks.py so that each callback first checks if the relevant files have been written. If so, simply return out. All fov_watcher.py will see is that these individual callbacks finished, thus allowing it to update properly.

Remaining issues

Testing on a live cohort.

@alex-l-kong alex-l-kong self-assigned this Jul 19, 2023
@alex-l-kong alex-l-kong marked this pull request as draft July 19, 2023 21:01
@alex-l-kong alex-l-kong marked this pull request as ready for review July 25, 2023 20:30
Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small suggestions with f-strings.

src/toffy/watcher_callbacks.py Outdated Show resolved Hide resolved
src/toffy/watcher_callbacks.py Outdated Show resolved Hide resolved
Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ngreenwald ngreenwald merged commit 8ce956a into main Jul 27, 2023
4 checks passed
@ngreenwald ngreenwald deleted the watcher_skip branch July 27, 2023 15:53
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.

Allow watcher to skip previously processed files
4 participants