fix: make sure important jobs/actions are running on high prio queue
This commit is contained in:
@@ -10,6 +10,8 @@ class StopApplication
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(Application $application, bool $previewDeployments = false, bool $dockerCleanup = true)
|
public function handle(Application $application, bool $previewDeployments = false, bool $dockerCleanup = true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@@ -46,7 +46,7 @@ class PrepareCoolifyTask
|
|||||||
call_event_on_finish: $this->remoteProcessArgs->call_event_on_finish,
|
call_event_on_finish: $this->remoteProcessArgs->call_event_on_finish,
|
||||||
call_event_data: $this->remoteProcessArgs->call_event_data,
|
call_event_data: $this->remoteProcessArgs->call_event_data,
|
||||||
);
|
);
|
||||||
dispatch($job)->onQueue('high');
|
dispatch($job);
|
||||||
$this->activity->refresh();
|
$this->activity->refresh();
|
||||||
|
|
||||||
return $this->activity;
|
return $this->activity;
|
||||||
|
@@ -16,6 +16,8 @@ class StartDatabase
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse $database)
|
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse $database)
|
||||||
{
|
{
|
||||||
$server = $database->destination->server;
|
$server = $database->destination->server;
|
||||||
@@ -49,7 +51,7 @@ class StartDatabase
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ($database->is_public && $database->public_port) {
|
if ($database->is_public && $database->public_port) {
|
||||||
StartDatabaseProxy::dispatch($database)->onQueue('high');
|
StartDatabaseProxy::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $activity;
|
return $activity;
|
||||||
|
@@ -18,6 +18,8 @@ class StartDatabaseProxy
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse|ServiceDatabase $database)
|
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse|ServiceDatabase $database)
|
||||||
{
|
{
|
||||||
$internalPort = null;
|
$internalPort = null;
|
||||||
|
@@ -18,6 +18,8 @@ class StopDatabaseProxy
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|ServiceDatabase|StandaloneDragonfly|StandaloneClickhouse $database)
|
public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|ServiceDatabase|StandaloneDragonfly|StandaloneClickhouse $database)
|
||||||
{
|
{
|
||||||
$server = data_get($database, 'destination.server');
|
$server = data_get($database, 'destination.server');
|
||||||
|
@@ -7,7 +7,6 @@ use App\Actions\Shared\ComplexStatusCheck;
|
|||||||
use App\Models\ApplicationPreview;
|
use App\Models\ApplicationPreview;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Models\ServiceDatabase;
|
use App\Models\ServiceDatabase;
|
||||||
use App\Notifications\Container\ContainerRestarted;
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
@@ -16,6 +15,8 @@ class GetContainersStatus
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public $applications;
|
public $applications;
|
||||||
|
|
||||||
public ?Collection $containers;
|
public ?Collection $containers;
|
||||||
|
@@ -9,6 +9,8 @@ class CleanupDocker
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(Server $server)
|
public function handle(Server $server)
|
||||||
{
|
{
|
||||||
$settings = instanceSettings();
|
$settings = instanceSettings();
|
||||||
|
@@ -130,10 +130,10 @@ class ServerCheck
|
|||||||
if ($foundLogDrainContainer) {
|
if ($foundLogDrainContainer) {
|
||||||
$status = data_get($foundLogDrainContainer, 'State.Status');
|
$status = data_get($foundLogDrainContainer, 'State.Status');
|
||||||
if ($status !== 'running') {
|
if ($status !== 'running') {
|
||||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
StartLogDrain::dispatch($this->server);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
StartLogDrain::dispatch($this->server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,6 +9,8 @@ class StartLogDrain
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(Server $server)
|
public function handle(Server $server)
|
||||||
{
|
{
|
||||||
if ($server->settings->is_logdrain_newrelic_enabled) {
|
if ($server->settings->is_logdrain_newrelic_enabled) {
|
||||||
|
@@ -29,7 +29,7 @@ class UpdateCoolify
|
|||||||
if (! $this->server) {
|
if (! $this->server) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CleanupDocker::dispatch($this->server)->onQueue('high');
|
CleanupDocker::dispatch($this->server);
|
||||||
$this->latestVersion = get_latest_version_of_coolify();
|
$this->latestVersion = get_latest_version_of_coolify();
|
||||||
$this->currentVersion = config('version');
|
$this->currentVersion = config('version');
|
||||||
if (! $manual_update) {
|
if (! $manual_update) {
|
||||||
|
@@ -9,6 +9,8 @@ class ValidateServer
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public ?string $uptime = null;
|
public ?string $uptime = null;
|
||||||
|
|
||||||
public ?string $error = null;
|
public ?string $error = null;
|
||||||
|
@@ -9,6 +9,8 @@ class RestartService
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(Service $service)
|
public function handle(Service $service)
|
||||||
{
|
{
|
||||||
StopService::run($service);
|
StopService::run($service);
|
||||||
|
@@ -10,6 +10,8 @@ class StartService
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(Service $service)
|
public function handle(Service $service)
|
||||||
{
|
{
|
||||||
$service->saveComposeConfigs();
|
$service->saveComposeConfigs();
|
||||||
|
@@ -10,6 +10,8 @@ class StopService
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
public string $jobQueue = 'high';
|
||||||
|
|
||||||
public function handle(Service $service, bool $isDeleteOperation = false, bool $dockerCleanup = true)
|
public function handle(Service $service, bool $isDeleteOperation = false, bool $dockerCleanup = true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@@ -96,7 +96,7 @@ class ServicesDelete extends Command
|
|||||||
if (! $confirmed) {
|
if (! $confirmed) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DeleteResourceJob::dispatch($toDelete)->onQueue('high');
|
DeleteResourceJob::dispatch($toDelete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ class ServicesDelete extends Command
|
|||||||
if (! $confirmed) {
|
if (! $confirmed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteResourceJob::dispatch($toDelete)->onQueue('high');
|
DeleteResourceJob::dispatch($toDelete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ class ServicesDelete extends Command
|
|||||||
if (! $confirmed) {
|
if (! $confirmed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteResourceJob::dispatch($toDelete)->onQueue('high');
|
DeleteResourceJob::dispatch($toDelete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1224,7 +1224,7 @@ class ApplicationsController extends Controller
|
|||||||
$service->name = "service-$service->uuid";
|
$service->name = "service-$service->uuid";
|
||||||
$service->parse(isNew: true);
|
$service->parse(isNew: true);
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartService::dispatch($service)->onQueue('high');
|
StartService::dispatch($service);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json(serializeApiResponse([
|
return response()->json(serializeApiResponse([
|
||||||
@@ -1379,7 +1379,7 @@ class ApplicationsController extends Controller
|
|||||||
deleteVolumes: $request->query->get('delete_volumes', true),
|
deleteVolumes: $request->query->get('delete_volumes', true),
|
||||||
dockerCleanup: $request->query->get('docker_cleanup', true),
|
dockerCleanup: $request->query->get('docker_cleanup', true),
|
||||||
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
||||||
)->onQueue('high');
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'Application deletion request queued.',
|
'message' => 'Application deletion request queued.',
|
||||||
@@ -2523,7 +2523,7 @@ class ApplicationsController extends Controller
|
|||||||
if (! $application) {
|
if (! $application) {
|
||||||
return response()->json(['message' => 'Application not found.'], 404);
|
return response()->json(['message' => 'Application not found.'], 404);
|
||||||
}
|
}
|
||||||
StopApplication::dispatch($application)->onQueue('high');
|
StopApplication::dispatch($application);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
|
@@ -497,9 +497,9 @@ class DatabasesController extends Controller
|
|||||||
$database->update($request->all());
|
$database->update($request->all());
|
||||||
|
|
||||||
if ($whatToDoWithDatabaseProxy === 'start') {
|
if ($whatToDoWithDatabaseProxy === 'start') {
|
||||||
StartDatabaseProxy::dispatch($database)->onQueue('high');
|
StartDatabaseProxy::dispatch($database);
|
||||||
} elseif ($whatToDoWithDatabaseProxy === 'stop') {
|
} elseif ($whatToDoWithDatabaseProxy === 'stop') {
|
||||||
StopDatabaseProxy::dispatch($database)->onQueue('high');
|
StopDatabaseProxy::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -1151,7 +1151,7 @@ class DatabasesController extends Controller
|
|||||||
}
|
}
|
||||||
$database = create_standalone_postgresql($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_postgresql($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
$payload = [
|
$payload = [
|
||||||
@@ -1206,7 +1206,7 @@ class DatabasesController extends Controller
|
|||||||
}
|
}
|
||||||
$database = create_standalone_mariadb($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_mariadb($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
@@ -1264,7 +1264,7 @@ class DatabasesController extends Controller
|
|||||||
}
|
}
|
||||||
$database = create_standalone_mysql($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_mysql($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
@@ -1320,7 +1320,7 @@ class DatabasesController extends Controller
|
|||||||
}
|
}
|
||||||
$database = create_standalone_redis($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_redis($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
@@ -1357,7 +1357,7 @@ class DatabasesController extends Controller
|
|||||||
removeUnnecessaryFieldsFromRequest($request);
|
removeUnnecessaryFieldsFromRequest($request);
|
||||||
$database = create_standalone_dragonfly($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_dragonfly($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json(serializeApiResponse([
|
return response()->json(serializeApiResponse([
|
||||||
@@ -1406,7 +1406,7 @@ class DatabasesController extends Controller
|
|||||||
}
|
}
|
||||||
$database = create_standalone_keydb($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_keydb($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
@@ -1442,7 +1442,7 @@ class DatabasesController extends Controller
|
|||||||
removeUnnecessaryFieldsFromRequest($request);
|
removeUnnecessaryFieldsFromRequest($request);
|
||||||
$database = create_standalone_clickhouse($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_clickhouse($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
@@ -1500,7 +1500,7 @@ class DatabasesController extends Controller
|
|||||||
}
|
}
|
||||||
$database = create_standalone_mongodb($environment->id, $destination->uuid, $request->all());
|
$database = create_standalone_mongodb($environment->id, $destination->uuid, $request->all());
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
}
|
}
|
||||||
|
|
||||||
$database->refresh();
|
$database->refresh();
|
||||||
@@ -1593,7 +1593,7 @@ class DatabasesController extends Controller
|
|||||||
deleteVolumes: $request->query->get('delete_volumes', true),
|
deleteVolumes: $request->query->get('delete_volumes', true),
|
||||||
dockerCleanup: $request->query->get('docker_cleanup', true),
|
dockerCleanup: $request->query->get('docker_cleanup', true),
|
||||||
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
||||||
)->onQueue('high');
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'Database deletion request queued.',
|
'message' => 'Database deletion request queued.',
|
||||||
@@ -1666,7 +1666,7 @@ class DatabasesController extends Controller
|
|||||||
if (str($database->status)->contains('running')) {
|
if (str($database->status)->contains('running')) {
|
||||||
return response()->json(['message' => 'Database is already running.'], 400);
|
return response()->json(['message' => 'Database is already running.'], 400);
|
||||||
}
|
}
|
||||||
StartDatabase::dispatch($database)->onQueue('high');
|
StartDatabase::dispatch($database);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
@@ -1742,7 +1742,7 @@ class DatabasesController extends Controller
|
|||||||
if (str($database->status)->contains('stopped') || str($database->status)->contains('exited')) {
|
if (str($database->status)->contains('stopped') || str($database->status)->contains('exited')) {
|
||||||
return response()->json(['message' => 'Database is already stopped.'], 400);
|
return response()->json(['message' => 'Database is already stopped.'], 400);
|
||||||
}
|
}
|
||||||
StopDatabase::dispatch($database)->onQueue('high');
|
StopDatabase::dispatch($database);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
@@ -1815,7 +1815,7 @@ class DatabasesController extends Controller
|
|||||||
if (! $database) {
|
if (! $database) {
|
||||||
return response()->json(['message' => 'Database not found.'], 404);
|
return response()->json(['message' => 'Database not found.'], 404);
|
||||||
}
|
}
|
||||||
RestartDatabase::dispatch($database)->onQueue('high');
|
RestartDatabase::dispatch($database);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
|
@@ -307,7 +307,7 @@ class DeployController extends Controller
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Database resource
|
// Database resource
|
||||||
StartDatabase::dispatch($resource)->onQueue('high');
|
StartDatabase::dispatch($resource);
|
||||||
$resource->update([
|
$resource->update([
|
||||||
'started_at' => now(),
|
'started_at' => now(),
|
||||||
]);
|
]);
|
||||||
|
@@ -550,7 +550,7 @@ class ServersController extends Controller
|
|||||||
'is_build_server' => $request->is_build_server,
|
'is_build_server' => $request->is_build_server,
|
||||||
]);
|
]);
|
||||||
if ($request->instant_validate) {
|
if ($request->instant_validate) {
|
||||||
ValidateServer::dispatch($server)->onQueue('high');
|
ValidateServer::dispatch($server);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -675,7 +675,7 @@ class ServersController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if ($request->instant_validate) {
|
if ($request->instant_validate) {
|
||||||
ValidateServer::dispatch($server)->onQueue('high');
|
ValidateServer::dispatch($server);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -813,7 +813,7 @@ class ServersController extends Controller
|
|||||||
if (! $server) {
|
if (! $server) {
|
||||||
return response()->json(['message' => 'Server not found.'], 404);
|
return response()->json(['message' => 'Server not found.'], 404);
|
||||||
}
|
}
|
||||||
ValidateServer::dispatch($server)->onQueue('high');
|
ValidateServer::dispatch($server);
|
||||||
|
|
||||||
return response()->json(['message' => 'Validation started.']);
|
return response()->json(['message' => 'Validation started.']);
|
||||||
}
|
}
|
||||||
|
@@ -342,7 +342,7 @@ class ServicesController extends Controller
|
|||||||
}
|
}
|
||||||
$service->parse(isNew: true);
|
$service->parse(isNew: true);
|
||||||
if ($instantDeploy) {
|
if ($instantDeploy) {
|
||||||
StartService::dispatch($service)->onQueue('high');
|
StartService::dispatch($service);
|
||||||
}
|
}
|
||||||
$domains = $service->applications()->get()->pluck('fqdn')->sort();
|
$domains = $service->applications()->get()->pluck('fqdn')->sort();
|
||||||
$domains = $domains->map(function ($domain) {
|
$domains = $domains->map(function ($domain) {
|
||||||
@@ -487,7 +487,7 @@ class ServicesController extends Controller
|
|||||||
deleteVolumes: $request->query->get('delete_volumes', true),
|
deleteVolumes: $request->query->get('delete_volumes', true),
|
||||||
dockerCleanup: $request->query->get('docker_cleanup', true),
|
dockerCleanup: $request->query->get('docker_cleanup', true),
|
||||||
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
||||||
)->onQueue('high');
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'Service deletion request queued.',
|
'message' => 'Service deletion request queued.',
|
||||||
@@ -1076,7 +1076,7 @@ class ServicesController extends Controller
|
|||||||
if (str($service->status())->contains('running')) {
|
if (str($service->status())->contains('running')) {
|
||||||
return response()->json(['message' => 'Service is already running.'], 400);
|
return response()->json(['message' => 'Service is already running.'], 400);
|
||||||
}
|
}
|
||||||
StartService::dispatch($service)->onQueue('high');
|
StartService::dispatch($service);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
@@ -1154,7 +1154,7 @@ class ServicesController extends Controller
|
|||||||
if (str($service->status())->contains('stopped') || str($service->status())->contains('exited')) {
|
if (str($service->status())->contains('stopped') || str($service->status())->contains('exited')) {
|
||||||
return response()->json(['message' => 'Service is already stopped.'], 400);
|
return response()->json(['message' => 'Service is already stopped.'], 400);
|
||||||
}
|
}
|
||||||
StopService::dispatch($service)->onQueue('high');
|
StopService::dispatch($service);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
@@ -1229,7 +1229,7 @@ class ServicesController extends Controller
|
|||||||
if (! $service) {
|
if (! $service) {
|
||||||
return response()->json(['message' => 'Service not found.'], 404);
|
return response()->json(['message' => 'Service not found.'], 404);
|
||||||
}
|
}
|
||||||
RestartService::dispatch($service)->onQueue('high');
|
RestartService::dispatch($service);
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
[
|
[
|
||||||
|
@@ -166,6 +166,8 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public function __construct(int $application_deployment_queue_id)
|
public function __construct(int $application_deployment_queue_id)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
|
||||||
$this->application_deployment_queue = ApplicationDeploymentQueue::find($application_deployment_queue_id);
|
$this->application_deployment_queue = ApplicationDeploymentQueue::find($application_deployment_queue_id);
|
||||||
$this->application = Application::find($this->application_deployment_queue->application_id);
|
$this->application = Application::find($this->application_deployment_queue->application_id);
|
||||||
$this->build_pack = data_get($this->application, 'build_pack');
|
$this->build_pack = data_get($this->application, 'build_pack');
|
||||||
@@ -349,8 +351,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
private function post_deployment()
|
private function post_deployment()
|
||||||
{
|
{
|
||||||
if ($this->server->isProxyShouldRun()) {
|
if ($this->server->isProxyShouldRun()) {
|
||||||
GetContainersStatus::dispatch($this->server)->onQueue('high');
|
GetContainersStatus::dispatch($this->server);
|
||||||
// dispatch(new ContainerStatusJob($this->server));
|
|
||||||
}
|
}
|
||||||
$this->next(ApplicationDeploymentStatus::FINISHED->value);
|
$this->next(ApplicationDeploymentStatus::FINISHED->value);
|
||||||
if ($this->pull_request_id !== 0) {
|
if ($this->pull_request_id !== 0) {
|
||||||
|
@@ -25,7 +25,9 @@ class ApplicationPullRequestUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
public ApplicationPreview $preview,
|
public ApplicationPreview $preview,
|
||||||
public ProcessStatus $status,
|
public ProcessStatus $status,
|
||||||
public ?string $deployment_uuid = null
|
public ?string $deployment_uuid = null
|
||||||
) {}
|
) {
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
@@ -23,7 +23,10 @@ class CoolifyTask implements ShouldBeEncrypted, ShouldQueue
|
|||||||
public bool $ignore_errors,
|
public bool $ignore_errors,
|
||||||
public $call_event_on_finish,
|
public $call_event_on_finish,
|
||||||
public $call_event_data,
|
public $call_event_data,
|
||||||
) {}
|
) {
|
||||||
|
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the job.
|
* Execute the job.
|
||||||
|
@@ -60,6 +60,7 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public function __construct($backup)
|
public function __construct($backup)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->backup = $backup;
|
$this->backup = $backup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,7 +35,9 @@ class DeleteResourceJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
public bool $deleteVolumes = true,
|
public bool $deleteVolumes = true,
|
||||||
public bool $dockerCleanup = true,
|
public bool $dockerCleanup = true,
|
||||||
public bool $deleteConnectedNetworks = true
|
public bool $deleteConnectedNetworks = true
|
||||||
) {}
|
) {
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
@@ -16,7 +16,10 @@ class PullHelperImageJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public $timeout = 1000;
|
public $timeout = 1000;
|
||||||
|
|
||||||
public function __construct(public Server $server) {}
|
public function __construct(public Server $server)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
|
@@ -17,7 +17,10 @@ class PullTemplatesFromCDN implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public $timeout = 10;
|
public $timeout = 10;
|
||||||
|
|
||||||
public function __construct() {}
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
|
@@ -360,7 +360,7 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
private function checkLogDrainContainer()
|
private function checkLogDrainContainer()
|
||||||
{
|
{
|
||||||
if ($this->server->isLogDrainEnabled() && $this->foundLogDrainContainer === false) {
|
if ($this->server->isLogDrainEnabled() && $this->foundLogDrainContainer === false) {
|
||||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
StartLogDrain::dispatch($this->server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,8 @@ class ScheduledTaskJob implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct($task)
|
public function __construct($task)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
|
||||||
$this->task = $task;
|
$this->task = $task;
|
||||||
if ($service = $task->service()->first()) {
|
if ($service = $task->service()->first()) {
|
||||||
$this->resource = $service;
|
$this->resource = $service;
|
||||||
|
@@ -32,7 +32,9 @@ class SendMessageToDiscordJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
public DiscordMessage $message,
|
public DiscordMessage $message,
|
||||||
public string $webhookUrl
|
public string $webhookUrl
|
||||||
) {}
|
) {
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the job.
|
* Execute the job.
|
||||||
|
@@ -33,7 +33,9 @@ class SendMessageToTelegramJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
public string $token,
|
public string $token,
|
||||||
public string $chatId,
|
public string $chatId,
|
||||||
public ?string $topicId = null,
|
public ?string $topicId = null,
|
||||||
) {}
|
) {
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the job.
|
* Execute the job.
|
||||||
|
@@ -94,10 +94,10 @@ class ServerCheckJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
if ($foundLogDrainContainer) {
|
if ($foundLogDrainContainer) {
|
||||||
$status = data_get($foundLogDrainContainer, 'State.Status');
|
$status = data_get($foundLogDrainContainer, 'State.Status');
|
||||||
if ($status !== 'running') {
|
if ($status !== 'running') {
|
||||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
StartLogDrain::dispatch($this->server);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
StartLogDrain::dispatch($this->server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,10 @@ class ServerFilesFromServerJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public function __construct(public ServiceApplication|ServiceDatabase|Application $resource) {}
|
public function __construct(public ServiceApplication|ServiceDatabase|Application $resource)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
@@ -14,7 +14,10 @@ class ServerStorageSaveJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public function __construct(public LocalFileVolume $localFileVolume) {}
|
public function __construct(public LocalFileVolume $localFileVolume)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
@@ -15,7 +15,10 @@ class SubscriptionInvoiceFailedJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public function __construct(protected Team $team) {}
|
public function __construct(protected Team $team)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
@@ -18,6 +18,11 @@ class UpdateCoolifyJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public $timeout = 600;
|
public $timeout = 600;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@@ -45,13 +45,11 @@ class Heading extends Component
|
|||||||
public function check_status($showNotification = false)
|
public function check_status($showNotification = false)
|
||||||
{
|
{
|
||||||
if ($this->application->destination->server->isFunctional()) {
|
if ($this->application->destination->server->isFunctional()) {
|
||||||
GetContainersStatus::dispatch($this->application->destination->server)->onQueue('high');
|
GetContainersStatus::dispatch($this->application->destination->server);
|
||||||
}
|
}
|
||||||
if ($showNotification) {
|
if ($showNotification) {
|
||||||
$this->dispatch('success', 'Success', 'Application status updated.');
|
$this->dispatch('success', 'Success', 'Application status updated.');
|
||||||
}
|
}
|
||||||
// Removed because it caused flickering
|
|
||||||
// $this->dispatch('configurationChanged');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function force_deploy_without_cache()
|
public function force_deploy_without_cache()
|
||||||
|
@@ -34,6 +34,7 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(Application $application, string $deployment_uuid, ?ApplicationPreview $preview = null)
|
public function __construct(Application $application, string $deployment_uuid, ?ApplicationPreview $preview = null)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->application = $application;
|
$this->application = $application;
|
||||||
$this->deployment_uuid = $deployment_uuid;
|
$this->deployment_uuid = $deployment_uuid;
|
||||||
$this->preview = $preview;
|
$this->preview = $preview;
|
||||||
|
@@ -34,6 +34,7 @@ class DeploymentSuccess extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(Application $application, string $deployment_uuid, ?ApplicationPreview $preview = null)
|
public function __construct(Application $application, string $deployment_uuid, ?ApplicationPreview $preview = null)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->application = $application;
|
$this->application = $application;
|
||||||
$this->deployment_uuid = $deployment_uuid;
|
$this->deployment_uuid = $deployment_uuid;
|
||||||
$this->preview = $preview;
|
$this->preview = $preview;
|
||||||
|
@@ -27,6 +27,7 @@ class StatusChanged extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(public Application $resource)
|
public function __construct(public Application $resource)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->resource_name = data_get($resource, 'name');
|
$this->resource_name = data_get($resource, 'name');
|
||||||
$this->project_uuid = data_get($resource, 'environment.project.uuid');
|
$this->project_uuid = data_get($resource, 'environment.project.uuid');
|
||||||
$this->environment_name = data_get($resource, 'environment.name');
|
$this->environment_name = data_get($resource, 'environment.name');
|
||||||
|
@@ -17,6 +17,6 @@ class DiscordChannel
|
|||||||
if (! $webhookUrl) {
|
if (! $webhookUrl) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dispatch(new SendMessageToDiscordJob($message, $webhookUrl))->onQueue('high');
|
SendMessageToDiscordJob::dispatch($message, $webhookUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,6 +41,6 @@ class TelegramChannel
|
|||||||
if (! $telegramToken || ! $chatId || ! $message) {
|
if (! $telegramToken || ! $chatId || ! $message) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dispatch(new SendMessageToTelegramJob($message, $buttons, $telegramToken, $chatId, $topicId))->onQueue('high');
|
SendMessageToTelegramJob::dispatch($message, $buttons, $telegramToken, $chatId, $topicId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,10 @@ class ContainerRestarted extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public string $name, public Server $server, public ?string $url = null) {}
|
public function __construct(public string $name, public Server $server, public ?string $url = null)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -15,7 +15,10 @@ class ContainerStopped extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public string $name, public Server $server, public ?string $url = null) {}
|
public function __construct(public string $name, public Server $server, public ?string $url = null)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -23,6 +23,7 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output, public $database_name)
|
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output, public $database_name)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->name = $database->name;
|
$this->name = $database->name;
|
||||||
$this->frequency = $backup->frequency;
|
$this->frequency = $backup->frequency;
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@ class BackupSuccess extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $database_name)
|
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $database_name)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->name = $database->name;
|
$this->name = $database->name;
|
||||||
$this->frequency = $backup->frequency;
|
$this->frequency = $backup->frequency;
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,10 @@ class GeneralNotification extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public string $message) {}
|
public function __construct(public string $message)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -21,6 +21,7 @@ class TaskFailed extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(public ScheduledTask $task, public string $output)
|
public function __construct(public ScheduledTask $task, public string $output)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
if ($task->application) {
|
if ($task->application) {
|
||||||
$this->url = $task->application->failedTaskLink($task->uuid);
|
$this->url = $task->application->failedTaskLink($task->uuid);
|
||||||
} elseif ($task->service) {
|
} elseif ($task->service) {
|
||||||
|
@@ -16,7 +16,10 @@ class DockerCleanup extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public Server $server, public string $message) {}
|
public function __construct(public Server $server, public string $message)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -18,7 +18,10 @@ class ForceDisabled extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public Server $server) {}
|
public function __construct(public Server $server)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -18,7 +18,10 @@ class ForceEnabled extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public Server $server) {}
|
public function __construct(public Server $server)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -15,7 +15,10 @@ class HighDiskUsage extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 1;
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(public Server $server, public int $disk_usage, public int $server_disk_usage_notification_threshold) {}
|
public function __construct(public Server $server, public int $disk_usage, public int $server_disk_usage_notification_threshold)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -22,6 +22,7 @@ class Reachable extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(public Server $server)
|
public function __construct(public Server $server)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->isRateLimited = isEmailRateLimited(
|
$this->isRateLimited = isEmailRateLimited(
|
||||||
limiterKey: 'server-reachable:'.$this->server->id,
|
limiterKey: 'server-reachable:'.$this->server->id,
|
||||||
);
|
);
|
||||||
|
@@ -22,6 +22,7 @@ class Unreachable extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function __construct(public Server $server)
|
public function __construct(public Server $server)
|
||||||
{
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
$this->isRateLimited = isEmailRateLimited(
|
$this->isRateLimited = isEmailRateLimited(
|
||||||
limiterKey: 'server-unreachable:'.$this->server->id,
|
limiterKey: 'server-unreachable:'.$this->server->id,
|
||||||
);
|
);
|
||||||
|
@@ -15,7 +15,10 @@ class Test extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 5;
|
public $tries = 5;
|
||||||
|
|
||||||
public function __construct(public ?string $emails = null) {}
|
public function __construct(public ?string $emails = null)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
|
@@ -22,7 +22,10 @@ class InvitationLink extends Notification implements ShouldQueue
|
|||||||
return [TransactionalEmailChannel::class];
|
return [TransactionalEmailChannel::class];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct(public User $user) {}
|
public function __construct(public User $user)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function toMail(): MailMessage
|
public function toMail(): MailMessage
|
||||||
{
|
{
|
||||||
|
@@ -14,7 +14,10 @@ class Test extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public $tries = 5;
|
public $tries = 5;
|
||||||
|
|
||||||
public function __construct(public string $emails) {}
|
public function __construct(public string $emails)
|
||||||
|
{
|
||||||
|
$this->onQueue('high');
|
||||||
|
}
|
||||||
|
|
||||||
public function via(): array
|
public function via(): array
|
||||||
{
|
{
|
||||||
|
@@ -44,13 +44,13 @@ function queue_application_deployment(Application $application, string $deployme
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if ($no_questions_asked) {
|
if ($no_questions_asked) {
|
||||||
dispatch(new ApplicationDeploymentJob(
|
ApplicationDeploymentJob::dispatch(
|
||||||
application_deployment_queue_id: $deployment->id,
|
application_deployment_queue_id: $deployment->id,
|
||||||
))->onQueue('high');
|
);
|
||||||
} elseif (next_queuable($server_id, $application_id)) {
|
} elseif (next_queuable($server_id, $application_id)) {
|
||||||
dispatch(new ApplicationDeploymentJob(
|
ApplicationDeploymentJob::dispatch(
|
||||||
application_deployment_queue_id: $deployment->id,
|
application_deployment_queue_id: $deployment->id,
|
||||||
))->onQueue('high');
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function force_start_deployment(ApplicationDeploymentQueue $deployment)
|
function force_start_deployment(ApplicationDeploymentQueue $deployment)
|
||||||
@@ -59,9 +59,9 @@ function force_start_deployment(ApplicationDeploymentQueue $deployment)
|
|||||||
'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
|
'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
dispatch(new ApplicationDeploymentJob(
|
ApplicationDeploymentJob::dispatch(
|
||||||
application_deployment_queue_id: $deployment->id,
|
application_deployment_queue_id: $deployment->id,
|
||||||
))->onQueue('high');
|
);
|
||||||
}
|
}
|
||||||
function queue_next_deployment(Application $application)
|
function queue_next_deployment(Application $application)
|
||||||
{
|
{
|
||||||
@@ -72,9 +72,9 @@ function queue_next_deployment(Application $application)
|
|||||||
'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
|
'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
dispatch(new ApplicationDeploymentJob(
|
ApplicationDeploymentJob::dispatch(
|
||||||
application_deployment_queue_id: $next_found->id,
|
application_deployment_queue_id: $next_found->id,
|
||||||
))->onQueue('high');
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,9 +113,9 @@ function next_after_cancel(?Server $server = null)
|
|||||||
'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
|
'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
dispatch(new ApplicationDeploymentJob(
|
ApplicationDeploymentJob::dispatch(
|
||||||
application_deployment_queue_id: $next->id,
|
application_deployment_queue_id: $next->id,
|
||||||
))->onQueue('high');
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user