Refactor for CoolifyTask.

This commit is contained in:
Joao Patricio
2023-05-03 06:15:45 +01:00
parent c3f13b54c1
commit e7763f3b73
17 changed files with 75 additions and 63 deletions

View File

@@ -48,13 +48,13 @@ class DeployApplication extends Component
public function stop()
{
runRemoteCommandSync($this->destination->server, ["docker stop -t 0 {$this->application->uuid} >/dev/null 2>&1"]);
instantRemoteProcess($this->destination->server, ["docker stop -t 0 {$this->application->uuid} >/dev/null 2>&1"]);
$this->application->status = 'stopped';
$this->application->save();
}
public function kill()
{
runRemoteCommandSync($this->destination->server, ["docker rm -f {$this->application->uuid}"]);
instantRemoteProcess($this->destination->server, ["docker rm -f {$this->application->uuid}"]);
if ($this->application->status != 'exited') {
$this->application->status = 'exited';
$this->application->save();