Current Behavior
Steps to reproduce the behavior
- Attempt to run any AtoM job which results in an error from MySQL (incorrect query, or the database being locked for instance).
- Look at the job output.
- Notice that the output says job succeeded despite the error message in the output
Expected Behavior
The job status should say failed not completed.
Possible Solution
arFileImportJob should mark these as failed and return when errors are encountered
|
if ($importer->hasErrors()) { |
|
foreach ($importer->getErrors() as $error) { |
|
$this->info($error); |
|
} |
|
} |
|
|
|
// Try to remove tmp file from uploads/tmp. |
|
if (isset($parameters['file']) && false === unlink($parameters['file']['tmp_name'])) { |
|
// Issue warning if unable to delete but do not show job as failed because of this. |
|
$this->error($this->i18n->__('Failed to delete temporary file %1 -- please check your folder permissions.', ['%1' => $parameters['file']['tmp_name']])); |
|
} |
|
|
|
// Mark job as complete. |
|
$this->info($this->i18n->__('Import complete.')); |
|
$this->job->setStatusCompleted(); |
|
$this->job->save(); |
|
|
Context and Notes
No response
Version used
No response
Operating System and version
No response
Default installation culture
No response
PHP version
No response
Contact details
No response
Current Behavior
Steps to reproduce the behavior
Expected Behavior
The job status should say failed not completed.
Possible Solution
arFileImportJobshould mark these as failed and return when errors are encounteredatom/lib/job/arFileImportJob.class.php
Lines 113 to 129 in 648b366
Context and Notes
No response
Version used
No response
Operating System and version
No response
Default installation culture
No response
PHP version
No response
Contact details
No response