fix: revert random container job delay
This commit is contained in:
parent
638bcf9732
commit
db13dd9304
3 changed files with 3 additions and 5 deletions
|
|
@ -40,8 +40,6 @@ public function __construct(public Server $server)
|
|||
|
||||
public function handle()
|
||||
{
|
||||
$rand = rand(1, 15);
|
||||
Sleep::for($rand)->seconds();
|
||||
try {
|
||||
if (!$this->server->isServerReady()) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -32,9 +32,10 @@ public function handle()
|
|||
try {
|
||||
$server = $this->resource->destination->server;
|
||||
if (!$server->isFunctional()) {
|
||||
$this->resource->delete();
|
||||
$this->resource->forceDelete();
|
||||
return 'Server is not functional';
|
||||
}
|
||||
$this->resource->delete();
|
||||
switch ($this->resource->type()) {
|
||||
case 'application':
|
||||
StopApplication::run($this->resource);
|
||||
|
|
@ -56,7 +57,6 @@ public function handle()
|
|||
break;
|
||||
}
|
||||
if ($this->resource->type() === 'service') {
|
||||
$this->resource->delete();
|
||||
DeleteService::dispatch($this->resource);
|
||||
} else {
|
||||
$this->resource->forceDelete();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public function mount()
|
|||
public function delete()
|
||||
{
|
||||
try {
|
||||
DeleteResourceJob::dispatch($this->resource);
|
||||
DeleteResourceJob::dispatchSync($this->resource);
|
||||
return $this->redirectRoute('project.resources', [
|
||||
'project_uuid' => $this->projectUuid,
|
||||
'environment_name' => $this->environmentName
|
||||
|
|
|
|||
Loading…
Reference in a new issue