2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 23:27:17 +08:00

特性:修复一堆问题

This commit is contained in:
耗子
2022-11-21 23:22:39 +08:00
parent e9ffcac3b1
commit 397d96d0ed
8305 changed files with 1996 additions and 1005109 deletions

View File

@@ -53,13 +53,13 @@ class ProcessShell implements ShouldQueue, ShouldBeUnique
public function handle(): void
{
// 查询任务
$task = Task::query()->where('id', $this->task_id)->get();
$task = Task::query()->where('id', $this->task_id)->first();
echo $task->name . "开始执行".PHP_EOL;
// 更新任务状态为running
$task->job_id = $this->job->getJobId();
$task->status = 'running';
$task->save();
//shell_exec($task->shell.' > '.$task->log.' 2>&1 &');
shell_exec($task->shell);
// 更新任务状态
$task->status = 'finished';
$task->save();