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

Ensure watcher can wait on run folder to appear #401

Merged
merged 15 commits into from
Aug 2, 2023
Merged

Conversation

alex-l-kong
Copy link
Contributor

What is the purpose of this PR?

Closes #377. The watcher is not currently designed to run until the run folder appears. This is problematic because this doesn't happen until about 15-30 minutes into the start of a run. The user needs to be able to spin up the watcher immediately after the run starts, otherwise it causes a significant inconvenience.

How did you implement your changes

fov_watcher.start_watcher will now take a new argument, run_folder_timeout, that controls how long the watcher waits for the run folder to appear. This allows implementation of timing logic similar to the timeout logic for waiting on .bin and .json files. The watcher will wait until either the run folder appears (in which case it listens for files inside run folder) or run_folder_timeout is reached (in which case it errors out with an informative message to the user).

Occasionally, what happens is the CACs will change the casing and/or add extraneous characters (notably "T" as a timestamp marker) to run names. If the run folder specified by the user hasn't already written to the CAC, warn the user to double check the run folder doesn't already exist in the D:\\Data folder under a slightly different name.

Remaining issues

Should we instead include the warning in a cell prior?

@alex-l-kong alex-l-kong self-assigned this Jul 31, 2023
@alex-l-kong alex-l-kong marked this pull request as draft July 31, 2023 22:58
@alex-l-kong alex-l-kong marked this pull request as ready for review August 1, 2023 00:02
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, have you tried this on a run yet?

src/toffy/fov_watcher.py Outdated Show resolved Hide resolved
tests/fov_watcher_test.py Show resolved Hide resolved
@alex-l-kong
Copy link
Contributor Author

Looks good, have you tried this on a run yet?

Yup, I tried it on Mako's

Copy link
Contributor

@camisowers camisowers 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 test efficiency thought. Also the builds/tests aren't running.

tests/fov_watcher_test.py Show resolved Hide resolved
@srivarra srivarra added the enhancement New feature or request label Aug 1, 2023
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 e3e7bc0 into main Aug 2, 2023
4 checks passed
@ngreenwald ngreenwald deleted the watcher_missing_run branch August 2, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure watcher can run even if run folder not written to Data
4 participants