fix: revert random container job delay
This commit is contained in:
parent
638bcf9732
commit
db13dd9304
@ -40,8 +40,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$rand = rand(1, 15);
|
|
||||||
Sleep::for($rand)->seconds();
|
|
||||||
try {
|
try {
|
||||||
if (!$this->server->isServerReady()) {
|
if (!$this->server->isServerReady()) {
|
||||||
return;
|
return;
|
||||||
|
@ -32,9 +32,10 @@ class DeleteResourceJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
try {
|
try {
|
||||||
$server = $this->resource->destination->server;
|
$server = $this->resource->destination->server;
|
||||||
if (!$server->isFunctional()) {
|
if (!$server->isFunctional()) {
|
||||||
$this->resource->delete();
|
$this->resource->forceDelete();
|
||||||
return 'Server is not functional';
|
return 'Server is not functional';
|
||||||
}
|
}
|
||||||
|
$this->resource->delete();
|
||||||
switch ($this->resource->type()) {
|
switch ($this->resource->type()) {
|
||||||
case 'application':
|
case 'application':
|
||||||
StopApplication::run($this->resource);
|
StopApplication::run($this->resource);
|
||||||
@ -56,7 +57,6 @@ class DeleteResourceJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ($this->resource->type() === 'service') {
|
if ($this->resource->type() === 'service') {
|
||||||
$this->resource->delete();
|
|
||||||
DeleteService::dispatch($this->resource);
|
DeleteService::dispatch($this->resource);
|
||||||
} else {
|
} else {
|
||||||
$this->resource->forceDelete();
|
$this->resource->forceDelete();
|
||||||
|
@ -24,7 +24,7 @@ class Danger extends Component
|
|||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
DeleteResourceJob::dispatch($this->resource);
|
DeleteResourceJob::dispatchSync($this->resource);
|
||||||
return $this->redirectRoute('project.resources', [
|
return $this->redirectRoute('project.resources', [
|
||||||
'project_uuid' => $this->projectUuid,
|
'project_uuid' => $this->projectUuid,
|
||||||
'environment_name' => $this->environmentName
|
'environment_name' => $this->environmentName
|
||||||
|
Loading…
x
Reference in New Issue
Block a user