lasthourcloud/app/Jobs/InstanceAutoUpdateJob.php

30 lines
759 B
PHP
Raw Normal View History

2023-05-22 10:00:59 +00:00
<?php
namespace App\Jobs;
2023-06-15 09:23:48 +00:00
use App\Actions\Server\UpdateCoolify;
2023-05-22 10:00:59 +00:00
use Illuminate\Bus\Queueable;
2023-09-14 08:12:44 +00:00
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
2023-05-26 06:16:39 +00:00
use Illuminate\Contracts\Queue\ShouldBeUnique;
2023-05-22 10:00:59 +00:00
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
2023-09-14 08:12:44 +00:00
class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique, ShouldBeEncrypted
2023-05-22 10:00:59 +00:00
{
2023-05-22 10:47:15 +00:00
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
2023-05-22 10:00:59 +00:00
2024-04-29 07:57:46 +00:00
public $timeout = 600;
public $tries = 1;
2023-06-06 06:43:01 +00:00
2023-05-25 20:59:33 +00:00
public function __construct(private bool $force = false)
2023-05-26 06:58:58 +00:00
{
}
2023-05-26 06:58:58 +00:00
public function handle(): void
2023-05-22 10:00:59 +00:00
{
2024-03-27 10:35:57 +00:00
UpdateCoolify::run(force: $this->force, async: false);
2023-06-15 07:27:00 +00:00
}
2023-05-22 10:00:59 +00:00
}