/** * Ini system param */ public function init() { parent::init(); ini_set('memory_limit', '-1'); set_time_limit(0); $this->_logger = LoggerFactory::getFileLogger('process_sync_db'); }
public function init() { parent::init(); Yii::getLogger()->autoFlush = 10; Yii::getLogger()->detachEventHandler('onFlush', array(Yii::app()->log, 'collectLogs')); Yii::getLogger()->attachEventHandler('onFlush', array($this, 'processLogs')); }
public function init() { parent::init(); ini_set('memory_limit', '-1'); set_time_limit(0); // All reports are generated basing on data in UTC time. TimezoneWork::set('UTC'); }
public function init() { parent::init(); ini_set('memory_limit', '-1'); set_time_limit(0); $this->_logger = LoggerFactory::getFileLogger('sms'); // $this->_logger = LoggerFactory::getConsoleLogger(); }
/** * Initialize the command object. */ public function init() { // Tell yii to flush the logs every message (instead of buffering for the default 10,000) // Without this, you cannot use the log to find out where the script has got to in it's current run. Yii::getLogger()->autoFlush = 1; Yii::getLogger()->autoDump = true; parent::init(); }
public function init() { parent::init(); Yii::import('application.modules.yupe.components.*'); Yii::import('application.modules.yupe.models.*'); Yii::import('application.modules.comment.models.*'); $this->migrator = is_object($this->migrator) ? $this->migrator : new Migrator(); $this->db = is_object($this->db) ? $this->db : Yii::app()->db; }
public function init() { parent::init(); ini_set('memory_limit', '-1'); set_time_limit(0); self::$_logger = LoggerFactory::getFileLogger('reports'); // All reports are generated basing on data in UTC time. TimezoneWork::set('UTC'); }
public function init() { parent::init(); ini_set('memory_limit', '-1'); ini_set('display_errors', '1'); set_time_limit(0); error_reporting(E_ALL); $this->_logger = LoggerFactory::getFileLogger('poller'); // $this->_logger = LoggerFactory::getConsoleLogger(); // For testing }
/** * Ini system param */ public function init() { parent::init(); ini_set('memory_limit', '-1'); set_time_limit(0); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); $this->_synchronization = new Synchronization(); $this->_logger = LoggerFactory::getFileLogger('TcpClientCommand'); // $this->_logger = LoggerFactory::getConsoleLogger(); if (Synchronization::setTcpClientPid(getmypid())) { $this->_logger->log(__METHOD__ . ' ' . 'process can take pid = ' . getmypid()); } else { $this->_logger->log(__METHOD__ . ' ' . 'process can not take pid.'); } }
/** * Initialize empty config parameters. */ public function init() { parent::init(); //Checking PHP interpriter path if ($this->interpreterPath === null) { if ($this->isWindowsOS()) { //Windows OS $this->interpreterPath = 'php.exe'; } else { //nix based OS $this->interpreterPath = '/usr/bin/env php'; } } //Checking logs directory if ($this->logsDir === null) { $this->logsDir = Yii::app()->getRuntimePath(); } //Checking bootstrap script if ($this->bootstrapScript === null) { $this->bootstrapScript = realpath($this->getCommandRunner()->getScriptName()); } }
public function init() { parent::init(); ini_set('memory_limit', '-1'); set_time_limit(0); error_reporting(E_ALL & ~E_WARNING); date_default_timezone_set('UTC'); /** * For flexibility system */ $this->founded_in = date('YmdHis'); /** * Logger */ $this->logger = LoggerFactory::getFileLogger('SyncStatusCommand'); // $this->logger = LoggerFactory::getConsoleLogger(); /** * Settings */ $this->settings = new Synchronization(); /** * Check pid */ if ($this->settings->getSynsStatusCommandPid() && ProcessPid::isActiveProcess($this->settings->getSynsStatusCommandPid())) { exit; } else { $this->settings->setSynsStatusCommandPid(getmypid()); } /** * Connector */ $server = ['ip' => $this->settings->server_ip, 'port' => $this->settings->server_port]; $client = ['ip' => $this->settings->remote_server_ip, 'port' => $this->settings->remote_server_port]; $this->connector = new UDPConnector($this->logger, $server, $client); /** * Message */ $this->message_features = [SyncStatusHandler::MESSAGE_TYPE => 'S', SyncStatusHandler::MESSAGE_FROM => $this->settings->getIdentificator(), SyncStatusHandler::FOUNDED_IN => $this->founded_in]; }
/** * initialize the colors */ public function init() { parent::init(); $this->_shellAlert = new ShellColors(); }
public function init() { ini_set('memory_limit', '-1'); set_time_limit(0); parent::init(); }
public function init() { echo "Deleting Inactive Users Older than days specified \n"; parent::init(); }
/** * */ public function init() { $this->timer = YII_BEGIN_TIME; parent::init(); }
public function init() { parent::init(); self::$_oCurrent = $this; }
public function init() { parent::init(); $this->db = EduDataBase::getConnection(); $this->db_crawler = EduDataBase::getConnection('db_crawler'); }