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

Adding upload capabilities to huntsman-pocs archiver #597

Merged
merged 5 commits into from
Aug 7, 2023

Conversation

bazkiaei
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3de4d98) 53.53% compared to head (83a2750) 53.53%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #597   +/-   ##
========================================
  Coverage    53.53%   53.53%           
========================================
  Files           68       68           
  Lines         4584     4584           
  Branches       621      621           
========================================
  Hits          2454     2454           
  Misses        2002     2002           
  Partials       128      128           

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

@@ -4,7 +4,6 @@
from huntsman.pocs.archive.archiver import Archiver

if __name__ == "__main__":

Copy link
Member

Choose a reason for hiding this comment

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

Please undo this as it serves no purpose.

archiver.start()

# Monitor the archiver
# If it breaks we want to terminate the script so docker can restart the service
Copy link
Member

Choose a reason for hiding this comment

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

I don't think docker will be doing any restarting of the service. This should run outside of docker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I started working on this by playing with archive-images.py and this comment is left there from that file. I will remove it.


# Monitor the archiver
# If it breaks we want to terminate the script so docker can restart the service
while True:
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a try that gracefully handles a Keyboardinterrupt. What if this happens during a file transfer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The introduced class in this file looks for fits files and copy them to the destination and delete each file after copying is completed.

Therefore in a scenario like the one you mentioned, the file that its copying is not completed still exist on the control computer and after re-running the code, the code finds it and transfers it to the server. The code deletes the file when the copying is completed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh! I forgot to add the try part! will do that in the next commit when receive your comments.

@bazkiaei
Copy link
Contributor Author

bazkiaei commented Aug 6, 2023

Hey @fergusL ! This PR is ready to be reviewed!

Copy link
Contributor

@fergusL fergusL left a comment

Choose a reason for hiding this comment

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

lgtm

@fergusL fergusL merged commit bca333c into AstroHuntsman:develop Aug 7, 2023
4 checks passed
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.

3 participants