Ensure watcher can wait on run folder to appear #401
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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) orrun_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 theD:\\Data
folder under a slightly different name.Remaining issues
Should we instead include the warning in a cell prior?