protected function init()
 {
     parent::init();
     if (file_exists($this->_cursorFile)) {
         $this->_startId = intval(file_get_contents($this->_cursorFile));
     }
 }
 protected function init()
 {
     parent::init();
     $this->_brokerId = $this->getOption('broker', 0);
     $logSuffix = date('Ymd');
     $this->_comboSpreadHouseNotInSolr = sprintf('/data1/logs/Monitor_JpHouseSpreadState-comboSpreadHouseNotInSolr-%d.log', $logSuffix);
     $this->_houseInSolrNotSpread = sprintf('/data1/logs/Monitor_JpHouseSpreadState-houseInSolrNotSpread-%d.log', $logSuffix);
 }
 protected function init()
 {
     parent::init();
     $this->_brokerId = intval($this->getOption('broker', 0));
     if ($this->_brokerId == 0) {
         echo 'Usage: launcher.php Repair_PersonalGalleryV2ByBrokerId --broker=... [--debug=[1|0]] [--release=...]';
         exit;
     }
     $this->_debug = (bool) $this->getOption('debug', true);
     $this->_pidFile = sprintf('/data1/logs/Repair_PersonalGalleryV2ByBrokerId-%d.id', $this->_brokerId);
 }
 protected function init()
 {
     parent::init();
     $options = $this->getOptions();
     if (isset($options['broker'])) {
         $this->_brokerId = intval($options['broker']);
     }
     if (isset($options['site'])) {
         if (in_array($options['site'], array('ajk', 'hz', 'jp'))) {
             $this->_siteType = $options['site'];
         }
     }
     $this->_noComboBrokerLogFile = sprintf('/data1/logs/Monitor_CheckBrokerHasCombo_NoComboBrokerLogFile-%d-%s.log', date('Ymd'), $this->_siteType);
 }
 protected function init()
 {
     parent::init();
     $city = $this->getOption('city', 11);
     if (!is_numeric($city)) {
         $this->logMsg('Usage: launcher.php House_UpDown_RepairSpreadOwner --city=[:number:] [--release=...] ');
         exit;
     }
     $this->_cityId = intval($city);
     $this->_doneFile = sprintf('/data1/logs/House_UpDown_RepairSpreadOwner-%d.done', $city);
     $this->_cursorFile = sprintf('/data1/logs/House_UpDown_RepairSpreadOwner-%d.cursor', $city);
     $this->_houseFile = sprintf('/data1/logs/House_UpDown_RepairSpreadOwner-%d.houseId', $city);
     $this->_startId = intval(file_get_contents($this->_cursorFile));
 }
 protected function init()
 {
     parent::init();
     $cityId = $this->getOption('city', 0);
     if (empty($cityId) || !is_numeric($cityId)) {
         $this->logMsg('Usage: launcher.php Combo_JpStopFixPlan --city=... [--release=...] ');
         exit;
     }
     $this->_cursorFile = sprintf('/data1/logs/Combo_JpStopFixPlan-%d.cursor', $cityId);
     $this->_doneFile = sprintf('/data1/logs/Combo_JpStopFixPlan-%d.done', $cityId);
     $this->_cityId = $cityId;
     if (file_exists($this->_cursorFile)) {
         $this->_startId = intval(file_get_contents($this->_cursorFile));
     }
 }
 protected function init()
 {
     parent::init();
     $cityId = intval($this->getOption('city', 0));
     $site = $this->getOption('site', 'ajk');
     if ($cityId == 0 || !in_array($site, array('ajk', 'hz', 'jp'))) {
         $this->logMsg('Usage: launcher.php Combo_MovePPCFixPlanRelation --city=... --site=[ajk | hz | jp] [--release=...] ');
         exit;
     }
     $this->_cityId = $cityId;
     $this->_dealSite = $site;
     $this->_doneFile = sprintf('/data1/logs/Combo_MovePPCFixPlanRelation-%s-%d.done', $site, $cityId);
     $this->_cursorFile = sprintf('/data1/logs/Combo_MovePPCFixPlanRelation-%s-%d.cursor', $site, $cityId);
     if (file_exists($this->_cursorFile)) {
         $this->_startId = intval(file_get_contents($this->_cursorFile));
     }
 }
 protected function init()
 {
     parent::init();
     $this->tableSplitSuffix = date('m');
     if (!file_exists($this->cursorFile) || !is_readable($this->cursorFile)) {
         return;
     }
     $sCursorInfo = file_get_contents($this->cursorFile);
     if (empty($sCursorInfo)) {
         return;
     }
     $cursorInfo = explode('|', $sCursorInfo);
     if (count($cursorInfo) != 2) {
         return;
     }
     list($this->tableSplitSuffix, $this->queueId) = $cursorInfo;
 }
 protected function init()
 {
     parent::init();
     $calculateDate = intval($this->getOption('date', 19700101));
     if ($calculateDate == 19700101) {
         $lastCalculateDate = Model_Config_huTablesUploadStatus::getTableLastCalculateDate('ajk_broker_choice_consume');
         if (empty($lastCalculateDate)) {
             $this->logMsg('没有获取到BI的统计上传日期');
             file_put_contents($this->_doneFile, 'YES');
             exit;
         }
         $calculateDate = intval(date('Ymd', strtotime($lastCalculateDate['calDt'])));
     }
     $this->_calculateDate = $calculateDate;
     if (file_exists($this->_cursorFile)) {
         $this->_startId = intval(file_get_contents($this->_cursorFile));
     }
 }
 protected function init()
 {
     parent::init();
     if (!file_exists($this->_cursorFile)) {
         if (false === file_put_contents($this->_cursorFile, 0)) {
             $this->logMsg(sprintf('写入游标失败。请检查目录的权限。游标文件:%s', $this->_cursorFile));
             exit;
         }
         return;
     }
     if (!is_readable($this->_cursorFile)) {
         $this->logMsg(sprintf('游标文件:%s 不可读,请检查文件权限。', $this->_cursorFile));
         exit;
     }
     if (!is_writable($this->_cursorFile)) {
         $this->logMsg(sprintf('游标文件:%s 不可写,请检查文件权限。', $this->_cursorFile));
         exit;
     }
     $this->_startId = intval(file_get_contents($this->_cursorFile));
 }