- Added new private methods _checkPermissions and _convertJobs to controller system/jq/JobsQueueManager

- Added new public method updateJobsQueue to controller system/jq/JobsQueueManager
- system/jq/JobsQueueManager->getLastJobs now checks permissions
- Added new public method updateJobsQueue to JQW_Controller
- Less redundant constansts in Library JobsQueueLib
- JobsQueueLib constructor now loads models JobsQueueModel, JobTypesModel and JobStatusesModel
- Added new public methods getLastJobs, addNewJobsToQueue and updateJobsQueue to JobsQueueLib
- Added new private methods _checkNewJobStructure, _checkUpdateJobStructure, _checkJobType, _checkJobStatus, _inArray, _dropNotAllowedPropertiesNewJob and _dropNotAllowedPropertiesUpdateJob to
This commit is contained in:
Paolo
2020-03-06 14:15:10 +01:00
parent d2e7336f2c
commit e92880b79a
3 changed files with 324 additions and 28 deletions
+14
View File
@@ -60,4 +60,18 @@ abstract class JQW_Controller extends JOB_Controller
return $result;
}
/**
* Updates jobs already present in the jobs queue
* jobs is an array of job objects
*/
protected function updateJobsQueue($type, $jobs)
{
$result = $this->jobsqueuelib->updateJobsQueue($type, $jobs);
// If an error occurred then log it in database
if (isError($result)) $this->logError(getError($result), $type);
return $result;
}
}