调整系统任务

This commit is contained in:
Anyon 2020-12-16 14:48:03 +08:00
parent 31aca2997b
commit 799afd87e2
2 changed files with 5 additions and 13 deletions

View File

@ -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);
}
/**

View File

@ -9,8 +9,8 @@
<!--{/if}-->
<!--{/if}-->
<!--{if auth("clear")}-->
<button data-load='{:url("clear")}' data-confirm="确定要创建定时清理任务吗?" class='layui-btn layui-btn-sm layui-btn-primary'>定时维护清理</button>
<!--{if auth("clean")}-->
<button data-queue='{:url("clean")}' class='layui-btn layui-btn-sm layui-btn-primary'>定时维护清理</button>
<!--{/if}-->
<!--{if auth("remove")}-->