Browse Source

更新了一些基础组件

panda 5 months ago
parent
commit
8db7f39d65
2 changed files with 3 additions and 2 deletions
  1. 1 1
      application/task/Kernel.php
  2. 2 1
      application/task/time/DemoTime.php

+ 1 - 1
application/task/Kernel.php

@@ -26,7 +26,7 @@ class Kernel{
      */
     public function schedule()
     {
-//        $this->command('DemoTime','1','minute');// 默认间隔1分钟触发 daily 单位分钟
+        $this->command('DemoTime','1','minute');// 默认间隔1分钟触发 daily 单位分钟
     }
 
     /**

+ 2 - 1
application/task/time/DemoTime.php

@@ -25,7 +25,8 @@ class DemoTime extends Command{
     // 业务代码 业务代码执行时间过长,会造成堵塞,请合理安排执行任务
     protected function execute(Input $input, Output $output)
     {
-        Queue::work(DemoJob::class,['a' => 1]);
+//        Queue::work(DemoJob::class,['a' => 1]);
+        echo 11;
         return 0;
     }
 }