-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
Codecov ReportPatch and project coverage have no change.
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. |
scripts/archive-images.py
Outdated
@@ -4,7 +4,6 @@ | |||
from huntsman.pocs.archive.archiver import Archiver | |||
|
|||
if __name__ == "__main__": | |||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Hey @fergusL ! This PR is ready to be reviewed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.