xxxrrrdddd 3 years ago
parent
commit
ab1c2ab15f
2 changed files with 4 additions and 3 deletions
  1. 1 1
      commands/mobile_activity.php
  2. 3 2
      work

+ 1 - 1
commands/mobile_activity.php

@@ -5,7 +5,7 @@ use Workerman\Worker as WO;
 class MobileActivity extends Com{
     public static function run(){
         $work=new WO();
-        $work->onWorkerStart=function ($conn){
+        $work->onWorkerStart=function (WO $worker){
             while (true){
                 $ids=Mobile::where('activity_time_end','<=',time())
                     ->where('is_activity',1)

+ 3 - 2
work

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