From 40766e7161f24d82628e6e128146d35d182dbaf4 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 22 Jul 2020 17:10:11 +0200 Subject: [PATCH] Added new public method getJobsByTypeStatusInput to controller core/JQW_Controller --- application/core/JQW_Controller.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/application/core/JQW_Controller.php b/application/core/JQW_Controller.php index 22393e476..ab63e7ffd 100644 --- a/application/core/JQW_Controller.php +++ b/application/core/JQW_Controller.php @@ -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 getJobsByTypeStatusInput($type, $status, $input) + { + $jobs = $this->jobsqueuelib->getJobsByTypeStatusInput($type, $status, $input); + + // If an error occurred then log it in database + if (isError($jobs)) $this->logError(getError($jobs), array($type, $status, $input)); + + return $jobs; + } + /** * Add new jobs in the jobs queue with the given type * jobs is an array of job objects