- Added new protected method getOldestJob to JQW_Controller

- Added new public method getOldestJob to JobsQueueLib
This commit is contained in:
Paolo
2021-02-16 21:21:11 +01:00
parent fec8fbb6d4
commit 94d335600c
2 changed files with 26 additions and 0 deletions
+13
View File
@@ -47,6 +47,19 @@ abstract class JQW_Controller extends JOB_Controller
return $jobs;
}
/**
* To get the oldest added job using the given job type
*/
protected function getOldestJob($type)
{
$jobs = $this->jobsqueuelib->getOldestJob($type);
// If an error occurred then log it in database
if (isError($jobs)) $this->logError(getError($jobs), $type);
return $jobs;
}
/**
* To get all the jobs specified by the given parameters
*/