lasthourcloud/app/Jobs/InstanceAutoUpdateJob.php
Andras Bacsai a489d95ea1 fix
2023-06-15 11:23:48 +02:00

30 lines
727 B
PHP

<?php
namespace App\Jobs;
use App\Actions\Server\UpdateCoolify;
use App\Models\InstanceSettings;
use App\Models\Server;
use Exception;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $timeout = 120;
public function __construct(private bool $force = false)
{
}
public function handle(): void
{
resolve(UpdateCoolify::class)($this->force);
}
}