/** * batch getFullStatus action returns the status of all schedulers and queues * * @action getFullStatus * @return KalturaFullStatusResponse */ function getFullStatusAction() { $response = new KalturaFullStatusResponse(); // gets queues length // $c = new Criteria(); // $c->add(BatchJobPeer::STATUS, array(KalturaBatchJobStatus::PENDING, KalturaBatchJobStatus::RETRY), Criteria::IN); // $c->addGroupByColumn(BatchJobPeer::JOB_TYPE); // $c->addSelectColumn('AVG(DATEDIFF(NOW(),' . BatchJobPeer::CREATED_AT . '))'); $queueList = BatchJobPeer::doQueueStatus(myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2)); $response->queuesStatus = KalturaBatchQueuesStatusArray::fromBatchQueuesStatusArray($queueList); $response->schedulers = KalturaSchedulerArray::statusFromSchedulerArray(SchedulerPeer::doSelect(new Criteria(), myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2))); return $response; }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(SchedulerPeer::DATABASE_NAME); $criteria->add(SchedulerPeer::ID, $pks, Criteria::IN); $objs = SchedulerPeer::doSelect($criteria, $con); } return $objs; }