浏览代码

[更新]修改系统任务

Anyon 5 年之前
父节点
当前提交
dfb5be87e1
共有 2 个文件被更改,包括 12 次插入1 次删除
  1. 11 0
      application/admin/controller/Queue.php
  2. 1 1
      application/admin/view/queue/index.html

+ 11 - 0
application/admin/controller/Queue.php

@@ -55,6 +55,17 @@ class Queue extends Controller
     }
 
     /**
+     * 重启系统任务
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\exception\PDOException
+     */
+    public function redo()
+    {
+        $this->_save($this->table, ['status' => '1']);
+    }
+
+    /**
      * 删除系统任务
      * @auth true
      * @throws \think\Exception

+ 1 - 1
application/admin/view/queue/index.html

@@ -64,7 +64,7 @@
                 </a>
                 {/if}
                 <br>
-                状态描述:<span class="color-desc">{$vo.status_desc|raw|default="没有获取到状态描述"}</span>
+                状态描述:<span class="color-desc">{$vo.desc|raw|default="没有获取到状态描述"}</span>
             </td>
         </tr>
         {/foreach}