mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
增加任务执行用户
This commit is contained in:
parent
689bc82dcf
commit
f075896234
@ -46,7 +46,12 @@ class Queue extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
if (AdminService::instance()->isSuper()) try {
|
if (AdminService::instance()->isSuper()) try {
|
||||||
$this->command = ProcessService::instance()->think('xadmin:queue start');
|
$process = ProcessService::instance();
|
||||||
|
if ($process->iswin()) {
|
||||||
|
$this->command = $process->think('xadmin:queue start');
|
||||||
|
} else {
|
||||||
|
$this->command = "sudo -u www {$process->think('xadmin:queue start')}";
|
||||||
|
}
|
||||||
$this->message = $this->app->console->call('xadmin:queue', ['status'])->fetch();
|
$this->message = $this->app->console->call('xadmin:queue', ['status'])->fetch();
|
||||||
$this->listen = preg_match('/process.*?\d+.*?running/', $this->message, $attr);
|
$this->listen = preg_match('/process.*?\d+.*?running/', $this->message, $attr);
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user