File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 10
10
11
11
class Sword
12
12
{
13
- const VERSION = '0.2.4 ' ;
13
+ const VERSION = '0.2.5 ' ;
14
14
}
Original file line number Diff line number Diff line change 11
11
use EasySwoole \Component \Di ;
12
12
use EasySwoole \EasySwoole \Command \CommandRunner ;
13
13
use EasySwoole \Command \Caller ;
14
- use EasySwoole \Crontab \Crontab ;
15
14
use EasySwoole \EasySwoole \ServerManager ;
16
15
use EasySwoole \EasySwoole \Swoole \EventRegister ;
17
16
use EasySwoole \EasySwoole \SysConst ;
@@ -135,7 +134,7 @@ public static function mainServerCreate(EventRegister $register)
135
134
$ crontabConfig ->setServerName ('SwordCrontab ' );
136
135
// 3.设置用来执行定时任务的 worker 进程数
137
136
$ crontabConfig ->setWorkerNum (2 );
138
- $ crontab = new Crontab ($ crontabConfig );
137
+ $ crontab = \ EasySwoole \ EasySwoole \ Crontab \Crontab:: getInstance ($ crontabConfig );
139
138
140
139
//取出配置目录全部文件
141
140
foreach (scandir ($ path ) as $ file ){
@@ -148,7 +147,6 @@ public static function mainServerCreate(EventRegister $register)
148
147
}
149
148
}
150
149
}
151
- $ crontab ->attachToServer (ServerManager::getInstance ()->getSwooleServer ());
152
150
}
153
151
154
152
/**
You can’t perform that action at this time.
0 commit comments