mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-24 17:14:12 +02:00
28 lines
769 B
PHP
28 lines
769 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Project\Application;
|
|
|
|
use App\Models\ApplicationDeploymentQueue;
|
|
use Livewire\Component;
|
|
|
|
class DeploymentLogs extends Component
|
|
{
|
|
public ApplicationDeploymentQueue $application_deployment_queue;
|
|
public $isKeepAliveOn = true;
|
|
protected $listeners = ['refreshQueue'];
|
|
|
|
public function refreshQueue()
|
|
{
|
|
$this->application_deployment_queue->refresh();
|
|
}
|
|
|
|
public function polling()
|
|
{
|
|
$this->dispatch('deploymentFinished');
|
|
$this->application_deployment_queue->refresh();
|
|
if (data_get($this->application_deployment_queue, 'status') == 'finished' || data_get($this->application_deployment_queue, 'status') == 'failed') {
|
|
$this->isKeepAliveOn = false;
|
|
}
|
|
}
|
|
}
|