From 799afd87e2101302061cd14bc790bab6225bb75d Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 16 Dec 2020 14:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=B3=BB=E7=BB=9F=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Queue.php | 14 +++----------- app/admin/view/queue/index.html | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/admin/controller/Queue.php b/app/admin/controller/Queue.php index 74e7ec870..94356c43e 100644 --- a/app/admin/controller/Queue.php +++ b/app/admin/controller/Queue.php @@ -98,21 +98,13 @@ class Queue extends Controller } } - /** - * 创建记录清理任务 + * 定时清理系统运行数据 * @auth true */ - public function clear() + public function clean() { - try { - QueueService::instance()->addCleanQueue(); - $this->success('创建清理任务成功!'); - } catch (HttpResponseException $exception) { - throw $exception; - } catch (\Exception $exception) { - $this->error($exception->getMessage()); - } + $this->_queue('定时清理系统运行数据', "xadmin:queue clean", 0, [], 0, 3600); } /** diff --git a/app/admin/view/queue/index.html b/app/admin/view/queue/index.html index d73230745..f3211b952 100644 --- a/app/admin/view/queue/index.html +++ b/app/admin/view/queue/index.html @@ -9,8 +9,8 @@ - - + +