Fix dispatch_sync issue in ContainerStatusJob
This commit is contained in:
parent
0670e6c1d6
commit
b52680a2d8
2 changed files with 6 additions and 5 deletions
|
|
@ -28,7 +28,7 @@ public function mount()
|
|||
}
|
||||
public function checkStatus()
|
||||
{
|
||||
dispatch_sync(new ContainerStatusJob($this->service->server));
|
||||
dispatch(new ContainerStatusJob($this->service->server));
|
||||
$this->refreshStacks();
|
||||
}
|
||||
public function refreshStacks()
|
||||
|
|
|
|||
|
|
@ -21,10 +21,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
|||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public function __construct(public Server $server)
|
||||
{
|
||||
$this->handle();
|
||||
}
|
||||
public function middleware(): array
|
||||
{
|
||||
return [(new WithoutOverlapping($this->server->id))->dontRelease()];
|
||||
|
|
@ -35,6 +31,11 @@ public function uniqueId(): int
|
|||
return $this->server->id;
|
||||
}
|
||||
|
||||
public function __construct(public Server $server)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function handle()
|
||||
{
|
||||
// ray("checking container statuses for {$this->server->id}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue