workerqueues (JQW_Controller and JobsQueueLib.php): added getJobsByTypeStatus method

This commit is contained in:
alex
2020-11-27 03:03:37 +01:00
parent 3c2fdc1991
commit ace636ef52
2 changed files with 25 additions and 0 deletions
+13
View File
@@ -47,6 +47,19 @@ abstract class JQW_Controller extends JOB_Controller
return $jobs;
}
/**
* To get all the jobs specified by the given parameters
*/
protected function getJobsByTypeStatus($type, $status)
{
$jobs = $this->jobsqueuelib->getJobsByTypeStatus($type, $status);
// If an error occurred then log it in database
if (isError($jobs)) $this->logError(getError($jobs), array($type, $status));
return $jobs;
}
/**
* To get all the jobs specified by the given parameters
*/