-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Imaging Uploader] Prevent upload duplication and handle other mriFile statuses #3150
[Imaging Uploader] Prevent upload duplication and handle other mriFile statuses #3150
Conversation
@@ -101,6 +101,17 @@ class UploadForm extends React.Component { | |||
return; | |||
} | |||
|
|||
// File in the middle of insertion pipeline | |||
if (mriFile.status === "In progress") { |
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.
In Progress
; it is case sensitive I think
works for me now; |
I am assuming this fix can not make it into 17.1; it has to be in 17.2? |
Why can't it go into 18.0.1? (Or whatever the .z is by the time the backlog of open PRs is by the time it catches up to this..) |
Okay @driusan |
…_upload_redmine_13190_13194
$filePath = $row[5]; | ||
$mincInserted = $row[10]; |
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.
@davidblader is there a risk of these hard coded values being different from a project to another ? if so, a redmine ticket should be issued in parallell to flag this for change in a minor version
@driusan to the limited extent of my knowledge, this looks good.but make sure to review it more thoroughly since its on the MRI side of things |
@davidblader This has conflicts that need to be resolved |
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 changes are good in my opinion (and I tested it too!). The changes handle the 2 other possible cases of insertion being in progress or not started
https://redmine.cbrain.mcgill.ca/issues/13190
https://redmine.cbrain.mcgill.ca/issues/13194
When retrieving the list of MRI's, _getFileList will only append files which already exist in the incoming data directory. However these files get deleted when the MRI pipeline runs successfully, allowing for duplicate uploads for previously successful files. It can be assumed that the insertion was successful based on the number of MINCs inserted being > 0. Use this in addition to file existence to generate the mriList which gets checked when an upload form is submitted