- Added new model system/JobTriggers_model

- Loads jqm configuration in controller system/jq/JobsQueueManager
- Added new table system.tbl_jobtriggers to system/dbupdate_3.3.php
- Added new privacy method _addNewTriggeredJobToQueue to JobsQueueLib
- JobsQueueLib is called by addNewJobsToQueue and updateJobsQueue
This commit is contained in:
Paolo
2020-03-12 18:51:26 +01:00
parent 8363f0d26c
commit 4d1dbdfae9
4 changed files with 144 additions and 11 deletions
@@ -0,0 +1,32 @@
<?php
class JobTriggers_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'system.tbl_jobtriggers';
$this->pk = array('type', 'status', 'followingType');
$this->hasSequence = false;
}
/**
*
*/
public function getJobtriggersByTypeStatuses($type, $triggeredStatuses)
{
$query = 'SELECT jt.type,
jt.status,
jt.following_type
FROM system.tbl_jobtriggers jt
WHERE jt.type = ?
AND jt.status IN ?
ORDER BY jt.type, jt.status';
return $this->execQuery($query, array($type, $triggeredStatuses));
}
}