当前位置: 首页>>代码示例>>PHP>>正文


PHP CConsoleCommand::afterAction方法代码示例

本文整理汇总了PHP中CConsoleCommand::afterAction方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsoleCommand::afterAction方法的具体用法?PHP CConsoleCommand::afterAction怎么用?PHP CConsoleCommand::afterAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CConsoleCommand的用法示例。


在下文中一共展示了CConsoleCommand::afterAction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: afterAction

 protected function afterAction($action, $params, $exitCode = 0)
 {
     if (isset($this->service['name'])) {
         $this->log("SERVICE: Service {$this->service['name']} exited with code {$exitCode} [PID: {$this->pid}] ");
         ServiceManager::markAsStopped($this->service['name'], $this->id);
     }
     return parent::afterAction($action, $params, $exitCode);
 }
开发者ID:reggi49,项目名称:plansys,代码行数:8,代码来源:Service.php

示例2: afterAction

 public function afterAction($action, $params, $exitCode = 0)
 {
     if ($this->outputLog) {
         echo implode("\n", $this->_log) . "\n";
     }
     array_unshift($this->_log, 'Launched at: ' . date("Y-m-d H:i:s"));
     file_put_contents(Yii::app()->params['logDirPath'] . '/moveFollowUpAppointment.log', implode("\n", $this->_log), FILE_APPEND);
     return parent::afterAction($action, $params, $exitCode);
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:9,代码来源:CronMoveFollowUpAppointmentsCommand.php

示例3: afterAction

 /**
  * (non-PHPdoc)
  * @see CConsoleCommand::afterAction()
  */
 protected function afterAction($action, $params, $exitCode = 0)
 {
     $dirPath = Yii::app()->runtimePath . '/locks/';
     $commandName = $this->getName();
     $lockFileName = "{$commandName}_{$action}_.lock";
     $lockFilePath = $dirPath . $lockFileName;
     if (file_exists($lockFilePath)) {
         unlink($lockFilePath);
     }
     return parent::afterAction($action, $params, $exitCode);
 }
开发者ID:xiaoxiaochengxyuan,项目名称:kshenghuo,代码行数:15,代码来源:ConsoleCommand.php

示例4: afterAction

 protected function afterAction($action, $params, $exitCode = 0)
 {
     \Yii::log("Unlock after action", \CLogger::LEVEL_TRACE, self::CATEGORY);
     unlink($this->lockFile);
     return parent::afterAction($action, $params, $exitCode);
 }
开发者ID:Wazelin,项目名称:yii-locked-console-command,代码行数:6,代码来源:LockedCommand.php

示例5: afterAction

 public function afterAction($action, $params, $exitCode = 0)
 {
     Console::writeLine('Command ended');
     return parent::afterAction($action, $params, $exitCode);
 }
开发者ID:evgeniys-hyuna,项目名称:leadsite,代码行数:5,代码来源:ExecutorTestCommand.php

示例6: afterAction

 protected function afterAction($action, $params, $exitCode = 0)
 {
     $this->isDone = true;
     return parent::afterAction($action, $params, $exitCode);
 }
开发者ID:eugenesavenko,项目名称:migraptor,代码行数:5,代码来源:MigraptorCommand.php

示例7: afterAction

 /**
  * Log the command was run into cron log table and email to DEV_EMAILS cron log result
  *
  * @param string $action
  * @param array  $params
  * @param int    $exitCode
  *
  * @return int|void
  */
 public function afterAction($action, $params, $exitCode = 0)
 {
     parent::afterAction($action, $params, $exitCode = 0);
     $commandName = $_SERVER['argv'][1];
     $params = json_encode($params);
     $serverName = gethostname();
     $model = new CronLog();
     $model->command_name = $commandName;
     $model->params = $params;
     $model->server_name = $serverName;
     $logFile = $this->getLogFile();
     $model->run_log = @file_get_contents($logFile);
     if ($this->emailLog) {
         $logs = "{$commandName} is run at " . date('m/d/Y h:i:s') . "\n";
         $logs .= 'Parameters: ' . print_r($_SERVER['argv'], 1) . "\n";
         $logs .= $this->getLogs();
         $logs .= print_r($_SERVER, 1);
         xmail($commandName . ' run log', nl2br($logs), SETTINGS_DEV_EMAILS);
     }
     @unlink($logFile);
     $model->save();
 }
开发者ID:hung5s,项目名称:yap,代码行数:31,代码来源:XConsoleCommand.php


注:本文中的CConsoleCommand::afterAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。