mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
Update Queue.php
This commit is contained in:
parent
56cd916948
commit
21403c3318
@ -16,6 +16,7 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\admin\Controller;
|
||||
use think\admin\service\AdminService;
|
||||
use think\admin\service\ProcessService;
|
||||
use think\admin\service\QueueService;
|
||||
use think\exception\HttpResponseException;
|
||||
@ -44,7 +45,7 @@ class Queue extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if ($this->app->session->get('user.username') === 'admin') try {
|
||||
if (AdminService::instance()->isSuper()) try {
|
||||
$this->command = ProcessService::instance()->think('xtask:start');
|
||||
$this->message = $this->app->console->call('xtask:state')->fetch();
|
||||
$this->listen = preg_match('/process.*?\d+.*?running/', $this->message, $attr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user