Skip to content

Commit

Permalink
cron
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwenbo committed Sep 28, 2018
1 parent b86d598 commit 78fc81d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,8 @@ public function run()
{
if( isset( $this->config['task_list'] ) && !empty( $this->config['task_list'] ) ){
$task_list = $this->config['task_list'];

var_dump( "定时任务:加载开始" );
// todo 这有bug 是阻塞的 kankan easyswoole 的最新定时任务
// 每次创建都会重新生成,以免和其他缓存命名冲突
$this->taskCachePrefix = "cron_".Random::randStr( 10 )."_";
$this->taskCachePrefix = "cron_ezswoole_";
// 定时执行
ServerManager::getInstance()->getServer()->tick( $this->config['loop_time'] * 1000, function() use ( &$task_list ){
$cache = Cache::getInstance();
Expand Down Expand Up @@ -97,8 +94,6 @@ public function run()
}
}
} );
var_dump( "定时任务:加载完毕" );

}
return true;
}
Expand Down

0 comments on commit 78fc81d

Please sign in to comment.