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

Resume Run Functionality #273

Merged
merged 13 commits into from
Dec 9, 2024

Conversation

Modularius
Copy link
Contributor

@Modularius Modularius commented Nov 21, 2024

Summary of changes

Added behaviour for the Nexus Writer to resume a run if it was interrupted by the component going down.

  • A file with extension ".partial_run" is added to the local path when a run_start is received. This file is removed when the nexus file is transferred to the archive (signalling a successful run).
  • When the nexus writer starts, any ".partial_run" ".nxs" files in the local path are read and runs re-created (as .partial_run .nxs files indicate that a previous instance of nexus writer had failed).

Instruction for review/testing

General code review.

Tool was tested with simulated data.

@Modularius Modularius requested a review from DanNixon November 26, 2024 10:49
@DanNixon
Copy link
Member

Is there a reason the NeXus file itself cannot be used as the source of information for a restarted run if the currently written to file uses the .nxs.tmp extension? This may be cleaner than writing a separate file.

@Modularius
Copy link
Contributor Author

I considered that, but thought it would couple the design of the file format with this functionality. I'd rather avoid that if possible.

@DanNixon
Copy link
Member

I considered that, but thought it would couple the design of the file format with this functionality. I'd rather avoid that if possible.

But all the information is already recorded in the data file (and can be assumed to always be there, as it is all pretty basic information). I can't see why just using that is not the most straightforward.

@Modularius
Copy link
Contributor Author

On second thoughts, you are right that this is the cleanest way to do it.

nexus-writer/src/nexus/engine.rs Outdated Show resolved Hide resolved
nexus-writer/src/nexus/run_parameters.rs Outdated Show resolved Hide resolved
nexus-writer/src/nexus/run.rs Outdated Show resolved Hide resolved
nexus-writer/Test1.nxs Outdated Show resolved Hide resolved
nexus-writer/TestRun1.nxs Outdated Show resolved Hide resolved
@Modularius Modularius requested a review from DanNixon December 9, 2024 13:57
@DanNixon DanNixon merged commit 10b362d into STFC-ICD-Research-and-Design:main Dec 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants