mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
Merge (#127)
This commit is contained in:
@ -29,7 +29,23 @@ public function create(mixed $queueable, array $input): void
|
||||
'status' => QueueStatus::CREATING,
|
||||
]);
|
||||
$queue->save();
|
||||
$queue->deploy();
|
||||
|
||||
dispatch(function () use ($queue) {
|
||||
$queue->server->processManager()->handler()->create(
|
||||
$queue->id,
|
||||
$queue->command,
|
||||
$queue->user,
|
||||
$queue->auto_start,
|
||||
$queue->auto_restart,
|
||||
$queue->numprocs,
|
||||
$queue->getLogFile(),
|
||||
$queue->site_id
|
||||
);
|
||||
$queue->status = QueueStatus::RUNNING;
|
||||
$queue->save();
|
||||
})->catch(function () use ($queue) {
|
||||
$queue->delete();
|
||||
})->onConnection('ssh');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,6 +76,6 @@ protected function validate(array $input): void
|
||||
],
|
||||
];
|
||||
|
||||
Validator::make($input, $rules)->validateWithBag('createQueue');
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user