xxxrrrdddd 2 years ago
parent
commit
dffab12a84
2 changed files with 22 additions and 3 deletions
  1. 19 0
      commands/mobile_import.php
  2. 3 3
      work

+ 19 - 0
commands/mobile_import.php

@@ -0,0 +1,19 @@
+<?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();

+ 3 - 3
work

@@ -31,8 +31,8 @@ abstract class Com{
     }
 }
 
-foreach (glob(__DIR__.'/commands/*.php') as $file){
+/*foreach (glob(__DIR__.'/commands/*.php') as $file){
     require $file;
-}
-
+}*/
+require __DIR__.'/commands/mobile_import.php';
 WO::runAll();