-
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
Fix for Remine ticket #10927: the server processes files are deleted only if the pipeline's exit code is 0. #2252
Conversation
…only if the pipeline's exit code is 0.
*/ | ||
public function deleteProcessFiles() | ||
{ | ||
return !is_null($exitCode) && is_numeric($exitCode) && $exitCode == 0; |
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.
$exitCode
doesn't seem to be defined in any scope that would mean the variable could be used here like this. It's neither an argument nor local variable..
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.
@nicolasbrossard @driusan
shouldn't the change have been made in:
https://github.com/aces/Loris/blob/master/modules/server_processes_manager/php/AbstractServerProcess.class.inc#L521
This is the line that I used to alternate between True/False depending on whether I wanted to keep those files or not...
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.
Deleting the process files only if the exit code is 0 is something that is specific to the MRI upload processes. I think the default behaviour (to delete all files all the time, which is defined in AbstractServerProcess) should remain as is and should only be overridden in MriUploadServerProcess.
This should facilitate debugging in some cases.