mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改系统任务管理
This commit is contained in:
parent
07f7163d24
commit
2a01a22bb0
@ -98,15 +98,15 @@ class Queue extends Controller
|
||||
{
|
||||
if (AdminService::instance()->isSuper()) try {
|
||||
$message = $this->app->console->call('xadmin:queue', ['status'])->fetch();
|
||||
if (preg_match('/process.*?\d+.*?running/', $message, $attrs)) {
|
||||
echo '<span class="color-green">' . $message . '</span>';
|
||||
if (preg_match('/process.*?\d+.*?running/', $message)) {
|
||||
echo "<span class='color-green pointer' data-tips-text='{$message}'>已启动</span>";
|
||||
} else {
|
||||
echo '<span class="color-red">' . $message . '</span>';
|
||||
echo "<span class='color-red pointer' data-tips-text='{$message}'>未启动</span>";
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
echo '<span class="color-red">' . $exception->getMessage() . '</span>';
|
||||
echo "<span class='color-red pointer' data-tips-text='{$exception->getMessage()}'>异 常</span>";
|
||||
} else {
|
||||
echo '<span class="color-red">只有超级管理员才能操作!</span>';
|
||||
echo "<span class='color-red pointer' data-tips-text='只有超级管理员才能操作!'>无权限</span>";
|
||||
}
|
||||
}
|
||||
}
|
@ -20,6 +20,11 @@
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-notify">
|
||||
<!--{if isset($super) and $super}-->
|
||||
<b>服务状态:</b><b class="margin-right-5" data-queue-message><span class="color-desc">检查中</span></b>
|
||||
<b data-tips-text="点击可复制【任务服务启动指令】" class="layui-icon pointer margin-right-20" data-copy="{$command|default=''}"></b>
|
||||
<script>$('[data-queue-message]').load('{:sysuri("admin/api.queue/status")}')</script>
|
||||
<!--{/if}-->
|
||||
<b>任务统计:</b>待处理 <b class="color-text">{$total.pre|default=0}</b> 个任务,处理中 <b class="color-blue">{$total.dos|default=0}</b> 个任务,已完成 <b class="color-green">{$total.oks|default=0}</b> 个任务,已失败 <b class="color-red">{$total.ers|default=0}</b> 个任务。
|
||||
</div>
|
||||
<div class="think-box-shadow">
|
||||
|
@ -1,16 +1,3 @@
|
||||
<!--{if isset($super) and $super}-->
|
||||
<fieldset class="margin-bottom-15">
|
||||
<legend class="notselect">服务状态</legend>
|
||||
<div class="layui-code border-0 margin-top-0">
|
||||
<h4 class="color-desc notselect">后台服务主进程运行状态</h4>
|
||||
<div data-queue-message>Checking task process running status ...</div>
|
||||
<script>$('[data-queue-message]').load('{:sysuri("admin/api.queue/status")}')</script>
|
||||
<h4 class="color-desc margin-top-10 notselect">配置定时任务来检查并启动进程(建议每分钟执行)</h4>
|
||||
<div>{$command|default='--'}</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--{/if}-->
|
||||
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
|
Loading…
x
Reference in New Issue
Block a user