mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Queue.php
This commit is contained in:
parent
28f7aef0b7
commit
b597feb6df
@ -29,21 +29,6 @@ use think\exception\HttpResponseException;
|
||||
*/
|
||||
class Queue extends Controller
|
||||
{
|
||||
/**
|
||||
* 任务进度查询
|
||||
* @login true
|
||||
* @throws \think\admin\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function progress()
|
||||
{
|
||||
$input = $this->_vali(['code.require' => '任务编号不能为空!']);
|
||||
$queue = QueueService::instance()->initialize($input['code']);
|
||||
$this->success('获取任务进度成功!', $queue->progress());
|
||||
}
|
||||
|
||||
/**
|
||||
* WIN停止监听进程
|
||||
* @login true
|
||||
@ -109,4 +94,20 @@ class Queue extends Controller
|
||||
echo "<span class='color-red pointer' data-tips-text='只有超级管理员才能操作!'>无权限</span>";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务进度查询
|
||||
* @login true
|
||||
* @throws \think\admin\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function progress()
|
||||
{
|
||||
$input = $this->_vali(['code.require' => '任务编号不能为空!']);
|
||||
$queue = QueueService::instance()->initialize($input['code']);
|
||||
$this->success('获取任务进度成功!', $queue->progress());
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user