protected function init()
 {
     parent::init();
     $params = $this->getOptions();
     $date = strtotime('-1 day');
     if (isset($params['date'])) {
         $date = strtotime($params['date']);
     }
     $this->_startTime = date('Y-m-d 00:00:00', $date);
     $this->_endTime = date('Y-m-d 23:59:59', $date);
     if (isset($params['deal'])) {
         $this->_dealType = intval($params['deal']);
     }
     if (!in_array($this->_dealType, $this->_houseTypeSet)) {
         $this->_dealType = 0;
     }
     $this->_cursorFile = sprintf('/data1/logs/Repair_JpHouseComboSpreadState_flag_%d.log', $this->_dealType);
     $this->_email = sprintf('/data1/logs/Repair_JpHouseComboSpreadState-%d.txt', $this->_dealType);
     $flag = $this->getFlag($this->_cursorFile);
     if (!empty($flag) && isset($flag['id'])) {
         $this->_startId = $flag['id'];
     }
     if ($this->_startId == 0) {
         echo sprintf('Usage: launcher.php Repair_JpHouseComboSpreadState [[--date=YYYY-MM-DD] [--deal=[0|1|2|3|4]] [--release=...]]'), PHP_EOL;
         echo sprintf("%'#35s%'#35s", ' Mr.Jackin ', PHP_EOL);
     }
 }
Example #2
0
 public function init()
 {
     parent::init();
     $params = $this->getOptions();
     if (isset($params['city']) && !empty($params['city'])) {
         $this->_cityId = intval($params['city']);
     }
 }
Example #3
0
 public function init()
 {
     parent::init();
     $params = $this->getOptions();
     if (isset($params['broker']) && !empty($params['broker'])) {
         $this->_hzBrokerId = intval($params['broker']);
     }
 }
Example #4
0
 protected function init()
 {
     parent::init();
     $this->_suffix = date('Ymd');
     $flag = $this->getFlag();
     if (is_array($flag) && isset($flag['id'])) {
         $this->_lastLogId = intval($flag['id']);
         if (isset($flag['date'])) {
             $this->_suffix = $flag['date'];
         }
     }
 }
Example #5
0
 protected function init()
 {
     parent::init();
     $arguments = $this->getOptions();
     if (isset($arguments['date'])) {
         $this->_date = date('Y-m-d', strtotime($arguments['date']));
     } else {
         $this->_date = date('Y-m-d', strtotime('-1 day'));
     }
     $flag = $this->getFlag();
     if (is_array($flag) && isset($flag['id'])) {
         $this->_startId = intval($flag['id']);
     }
 }
Example #6
0
 protected function init()
 {
     parent::init();
     $arguments = $this->getOptions();
     if (isset($arguments['city']) && is_numeric($arguments['city'])) {
         $this->_cityId = intval($arguments['city']);
     }
     $this->_expireTime = strtotime(date('Y-m-d 00:00:00')) - 86400 * Const_HzStatus::PROP_EXPIRED;
     $this->_cursorFile = sprintf('/data1/logs/Monitor_HzHouseExpire-%d.cursor', $this->_cityId);
     $flag = $this->getFlag($this->_cursorFile);
     if (is_array($flag) && isset($flag['id'])) {
         $this->_startId = intval($flag['id']);
     }
 }
 protected function init()
 {
     parent::init();
     $params = $this->getOptions();
     $date = strtotime('-1 day');
     if (isset($params['date'])) {
         $date = strtotime($params['date']);
     }
     if (isset($params['city'])) {
         $this->_cityId = intval($params['city']);
     }
     $this->_startTime = date('Y-m-d 00:00:00', $date);
     $this->_endTime = date('Y-m-d 23:59:59', $date);
     $flag = $this->getFlag();
     if (!empty($flag) && isset($flag['id'])) {
         $this->_startId = $flag['id'];
     }
     if ($this->_startId == 0) {
         echo sprintf('Usage: launcher.php Repair_HzHouseComboSpreadState [[--date=YYYY-MM-DD] [--city=[:number:]] [--release=...]]'), PHP_EOL;
         echo sprintf("%'#35s%'#35s", ' Mr.Jackin ', PHP_EOL);
     }
 }
Example #8
0
 protected function init()
 {
     parent::init();
 }
Example #9
0
 protected function init()
 {
     parent::init();
     //$file = self::FILEPATH.str_replace('Controller', '', get_called_class());
     //$file = $file.date("Ymd",strtotime("-1 day"))."_stop.log";
 }