fix: containerStatusJob
This commit is contained in:
		@@ -40,8 +40,6 @@ class Kernel extends ConsoleKernel
 | 
			
		||||
    private function check_resources($schedule)
 | 
			
		||||
    {
 | 
			
		||||
        $servers = Server::all()->where('settings.is_usable', true)->where('settings.is_reachable', true);
 | 
			
		||||
        ray($servers);
 | 
			
		||||
 | 
			
		||||
        foreach ($servers as $server) {
 | 
			
		||||
            $schedule->job(new ContainerStatusJob($server))->everyMinute()->onOneServer();
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -18,10 +18,8 @@ class Status extends Component
 | 
			
		||||
    public function getProxyStatus()
 | 
			
		||||
    {
 | 
			
		||||
        try {
 | 
			
		||||
            if ($this->server->isFunctional()) {
 | 
			
		||||
                dispatch_sync(new ContainerStatusJob($this->server));
 | 
			
		||||
                $this->emit('proxyStatusUpdated');
 | 
			
		||||
            }
 | 
			
		||||
            dispatch_sync(new ContainerStatusJob($this->server));
 | 
			
		||||
            $this->emit('proxyStatusUpdated');
 | 
			
		||||
        } catch (\Throwable $e) {
 | 
			
		||||
            return handleError($e, $this);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -28,11 +28,12 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
 | 
			
		||||
 | 
			
		||||
    public function __construct(public Server $server)
 | 
			
		||||
    {
 | 
			
		||||
        $this->handle();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function middleware(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [new WithoutOverlapping($this->server->uuid)];
 | 
			
		||||
        return [(new WithoutOverlapping($this->server->uuid))->dontRelease()];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function uniqueId(): string
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ class GeneralNotification extends Notification implements ShouldQueue
 | 
			
		||||
{
 | 
			
		||||
    use Queueable;
 | 
			
		||||
 | 
			
		||||
    public $tries = 5;
 | 
			
		||||
    public $tries = 1;
 | 
			
		||||
    public function __construct(public string $message)
 | 
			
		||||
    {
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user