coolify/app/Jobs/ApplicationRestartJob.php

33 lines
825 B
PHP
Raw Normal View History

2023-11-21 22:17:35 +01:00
<?php
namespace App\Jobs;
use App\Traits\ExecuteRemoteCommand;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
2024-06-10 22:43:34 +02:00
class ApplicationRestartJob implements ShouldBeEncrypted, ShouldQueue
2023-11-21 22:17:35 +01:00
{
2024-06-10 22:43:34 +02:00
use Dispatchable, ExecuteRemoteCommand, InteractsWithQueue, Queueable, SerializesModels;
2023-11-21 22:17:35 +01:00
public $timeout = 3600;
2024-06-10 22:43:34 +02:00
2023-11-21 22:17:35 +01:00
public $tries = 1;
2024-06-10 22:43:34 +02:00
2023-11-21 22:17:35 +01:00
public string $applicationDeploymentQueueId;
2024-06-10 22:43:34 +02:00
2023-11-21 22:17:35 +01:00
public function __construct(string $applicationDeploymentQueueId)
{
$this->applicationDeploymentQueueId = $applicationDeploymentQueueId;
}
2024-06-10 22:43:34 +02:00
public function handle()
{
2023-11-21 22:17:35 +01:00
ray('Restarting application');
}
}