mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-05-21 22:39:16 +08:00
调整系统任务
This commit is contained in:
parent
31aca2997b
commit
799afd87e2
@ -98,21 +98,13 @@ class Queue extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建记录清理任务
|
* 定时清理系统运行数据
|
||||||
* @auth true
|
* @auth true
|
||||||
*/
|
*/
|
||||||
public function clear()
|
public function clean()
|
||||||
{
|
{
|
||||||
try {
|
$this->_queue('定时清理系统运行数据', "xadmin:queue clean", 0, [], 0, 3600);
|
||||||
QueueService::instance()->addCleanQueue();
|
|
||||||
$this->success('创建清理任务成功!');
|
|
||||||
} catch (HttpResponseException $exception) {
|
|
||||||
throw $exception;
|
|
||||||
} catch (\Exception $exception) {
|
|
||||||
$this->error($exception->getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth("clear")}-->
|
<!--{if auth("clean")}-->
|
||||||
<button data-load='{:url("clear")}' data-confirm="确定要创建定时清理任务吗?" class='layui-btn layui-btn-sm layui-btn-primary'>定时维护清理</button>
|
<button data-queue='{:url("clean")}' class='layui-btn layui-btn-sm layui-btn-primary'>定时维护清理</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if auth("remove")}-->
|
<!--{if auth("remove")}-->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user