public function clearMemory() { accessControlPeer::clearInstancePool(); BatchJobPeer::clearInstancePool(); BulkUploadResultPeer::clearInstancePool(); categoryPeer::clearInstancePool(); EmailIngestionProfilePeer::clearInstancePool(); entryPeer::clearInstancePool(); FileSyncPeer::clearInstancePool(); flavorAssetPeer::clearInstancePool(); flavorParamsConversionProfilePeer::clearInstancePool(); flavorParamsOutputPeer::clearInstancePool(); flavorParamsPeer::clearInstancePool(); kshowPeer::clearInstancePool(); mediaInfoPeer::clearInstancePool(); moderationFlagPeer::clearInstancePool(); moderationPeer::clearInstancePool(); notificationPeer::clearInstancePool(); roughcutEntryPeer::clearInstancePool(); SchedulerConfigPeer::clearInstancePool(); SchedulerPeer::clearInstancePool(); SchedulerStatusPeer::clearInstancePool(); SchedulerWorkerPeer::clearInstancePool(); StorageProfilePeer::clearInstancePool(); syndicationFeedPeer::clearInstancePool(); TrackEntryPeer::clearInstancePool(); uiConfPeer::clearInstancePool(); UploadTokenPeer::clearInstancePool(); // TODO clear default filters // TODO call all memory cleaner plugins if (function_exists('gc_collect_cycles')) { // php 5.3 and above gc_collect_cycles(); } }
public static function deleteBySchedulerConfigId($schedulerId) { $criteria = new Criteria(); $criteria->add(SchedulerPeer::CONFIGURED_ID, $schedulerId); SchedulerPeer::doDelete($criteria); SchedulerWorkerPeer::deleteBySchedulerConfigId($schedulerId); SchedulerConfigPeer::deleteBySchedulerConfigId($schedulerId); SchedulerStatusPeer::deleteBySchedulerConfigId($schedulerId); ControlPanelCommandPeer::deleteBySchedulerConfigId($schedulerId); }
/** * 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; }
/** * Builds a Criteria object containing the primary key for this object. * * Unlike buildCriteria() this method includes the primary key values regardless * of whether or not they have been modified. * * @return Criteria The Criteria object containing value(s) for primary key(s). */ public function buildPkeyCriteria() { $criteria = new Criteria(SchedulerPeer::DATABASE_NAME); $criteria->add(SchedulerPeer::ID, $this->id); if ($this->alreadyInSave && count($this->modifiedColumns) == 2 && $this->isColumnModified(SchedulerPeer::UPDATED_AT)) { $theModifiedColumn = null; foreach ($this->modifiedColumns as $modifiedColumn) { if ($modifiedColumn != SchedulerPeer::UPDATED_AT) { $theModifiedColumn = $modifiedColumn; } } $atomicColumns = SchedulerPeer::getAtomicColumns(); if (in_array($theModifiedColumn, $atomicColumns)) { $criteria->add($theModifiedColumn, $this->getByName($theModifiedColumn, BasePeer::TYPE_COLNAME), Criteria::NOT_EQUAL); } } return $criteria; }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = SchedulerPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setCreatedAt($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setCreatedBy($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setUpdatedAt($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setUpdatedBy($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setConfiguredId($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setName($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setDescription($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setStatuses($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setLastStatus($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setHost($arr[$keys[10]]); } }
public static function clearMemory() { accessControlPeer::clearInstancePool(); kuserPeer::clearInstancePool(); kshowPeer::clearInstancePool(); entryPeer::clearInstancePool(); // kvotePeer::clearInstancePool(); // commentPeer::clearInstancePool(); // flagPeer::clearInstancePool(); // favoritePeer::clearInstancePool(); // KshowKuserPeer::clearInstancePool(); // MailJobPeer::clearInstancePool(); SchedulerPeer::clearInstancePool(); SchedulerWorkerPeer::clearInstancePool(); SchedulerStatusPeer::clearInstancePool(); SchedulerConfigPeer::clearInstancePool(); ControlPanelCommandPeer::clearInstancePool(); BatchJobPeer::clearInstancePool(); // PriorityGroupPeer::clearInstancePool(); BulkUploadResultPeer::clearInstancePool(); // blockedEmailPeer::clearInstancePool(); // conversionPeer::clearInstancePool(); // flickrTokenPeer::clearInstancePool(); PuserKuserPeer::clearInstancePool(); // PuserRolePeer::clearInstancePool(); PartnerPeer::clearInstancePool(); // WidgetLogPeer::clearInstancePool(); // adminKuserPeer::clearInstancePool(); // notificationPeer::clearInstancePool(); moderationPeer::clearInstancePool(); moderationFlagPeer::clearInstancePool(); roughcutEntryPeer::clearInstancePool(); // widgetPeer::clearInstancePool(); uiConfPeer::clearInstancePool(); // PartnerStatsPeer::clearInstancePool(); // PartnerActivityPeer::clearInstancePool(); ConversionProfilePeer::clearInstancePool(); // ConversionParamsPeer::clearInstancePool(); // KceInstallationErrorPeer::clearInstancePool(); FileSyncPeer::clearInstancePool(); accessControlPeer::clearInstancePool(); mediaInfoPeer::clearInstancePool(); assetParamsPeer::clearInstancePool(); assetParamsOutputPeer::clearInstancePool(); assetPeer::clearInstancePool(); conversionProfile2Peer::clearInstancePool(); flavorParamsConversionProfilePeer::clearInstancePool(); categoryPeer::clearInstancePool(); syndicationFeedPeer::clearInstancePool(); TrackEntryPeer::clearInstancePool(); // SystemUserPeer::clearInstancePool(); StorageProfilePeer::clearInstancePool(); // EmailIngestionProfilePeer::clearInstancePool(); UploadTokenPeer::clearInstancePool(); // invalidSessionPeer::clearInstancePool(); DynamicEnumPeer::clearInstancePool(); UserLoginDataPeer::clearInstancePool(); PermissionPeer::clearInstancePool(); UserRolePeer::clearInstancePool(); PermissionItemPeer::clearInstancePool(); PermissionToPermissionItemPeer::clearInstancePool(); KuserToUserRolePeer::clearInstancePool(); $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaMemoryCleaner'); foreach ($pluginInstances as $pluginInstance) { $pluginInstance->cleanMemory(); } if (function_exists('gc_collect_cycles')) { // php 5.3 and above gc_collect_cycles(); } }