Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Apr 13, 2020
1 parent 56890f8 commit 2de5268
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Crontab/Crontab.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use EasySwoole\EasySwoole\Config;
use EasySwoole\EasySwoole\Crontab\Exception\CronTaskNotExist;
use EasySwoole\EasySwoole\Crontab\Exception\CronTaskRuleInvalid;
use EasySwoole\EasySwoole\Crontab\Exception\Exception;
use EasySwoole\EasySwoole\ServerManager;
use EasySwoole\EasySwoole\Task\TaskManager;
use EasySwoole\EasySwoole\Trigger;
Expand Down Expand Up @@ -120,6 +121,10 @@ function infoTable(): Table
function __run()
{
if (!empty($this->tasks)) {
//检查task配置
if(Config::getInstance()->getConf('MAIN_SERVER.TASK.workerNum') <= 0){
throw new Exception("config item MAIN_SERVER.TASK.workerNum can not be 0");
}
$server = ServerManager::getInstance()->getSwooleServer();
$name = Config::getInstance()->getConf('SERVER_NAME');
$config = new ProcessConfig();
Expand Down

0 comments on commit 2de5268

Please sign in to comment.