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

Implement image recovery system #47

Merged
merged 11 commits into from
Dec 2, 2023
Merged

Implement image recovery system #47

merged 11 commits into from
Dec 2, 2023

Conversation

albireox
Copy link
Member

@albireox albireox commented Dec 2, 2023

This PR introduces a framework for recovering exposures that failed to write to disk.

During readout, once the buffer has been read and the header compiled, a lockfile is created with the same name as the final image + .lock. The lockfile contains the FetchDataDict with the exception of the data itself.

If an error prevents the image from being written, the lockfile can be used to recover the image. The ExposureRecovery class contains tools to update the lockfile and use it to recover the image.

During recovery, the lockfile is read and the buffer that contained the original data is fetched again. Wit that and the header from the lockfile it's possible to write the actual FITS file to disk.

Recovery happens automatically on the /data/.../MJD directory when the actor starts. It's also possible to trigger it manually with the recover command.

Copy link

codecov bot commented Dec 2, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (cb47f85) 87.0% compared to head (1ca2a7e) 88.1%.
Report is 1 commits behind head on main.

Files Patch % Lines
archon/actor/commands/expose.py 41.7% 4 Missing and 3 partials ⚠️
archon/actor/delegate.py 87.1% 5 Missing and 2 partials ⚠️
archon/actor/actor.py 90.0% 1 Missing and 1 partial ⚠️
archon/actor/recovery.py 99.2% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main     #47     +/-   ##
=======================================
+ Coverage   87.0%   88.1%   +1.2%     
=======================================
  Files         21      23      +2     
  Lines       1986    2160    +174     
  Branches     497     542     +45     
=======================================
+ Hits        1726    1901    +175     
+ Misses       171     167      -4     
- Partials      89      92      +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@albireox albireox merged commit ad5d8aa into main Dec 2, 2023
6 checks passed
@albireox albireox deleted the albireox-recovery branch December 2, 2023 08:39
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.

None yet

1 participant