Added new public method getJobsByTypeStatusInput to library JobsQueueLib

This commit is contained in:
Paolo
2020-07-22 16:51:38 +02:00
parent 73bf1fb050
commit a9ba3f039f
+12
View File
@@ -56,6 +56,18 @@ class JobsQueueLib
return $this->_ci->JobsQueueModel->loadWhere(array('status' => self::STATUS_NEW, 'type' => $type));
}
/**
* To get all the jobs specified by the given parameters
*/
public function getJobsByTypeStatusInput($type, $status, $input)
{
$this->_ci->JobsQueueModel->resetQuery();
$this->_ci->JobsQueueModel->addOrder('creationtime', 'DESC');
return $this->_ci->JobsQueueModel->loadWhere(array('status' => $status, 'type' => $type, 'input' => $input));
}
/**
* Add new jobs in the jobs queue with the given type
* jobs is an array of job objects