12345678910111213141516171819 |
- <?php
- use Workerman\Lib\Timer;
- use Workerman\Worker as WO;
- class MobileImportWork extends Com{
- public static function run(){
- $work=self::newWorker();
- $work->onWorkerStart=function (WO $worker){
- Timer::add(3,function ()use ($worker){
- self::import();
- });
- };
- }
- public static function import(){
- throw_user('aaaa');
- }
- }
- MobileImportWork::run();
|