move files around
This commit is contained in:
27
app/Http/Livewire/Project/Application/PollDeployment.php
Normal file
27
app/Http/Livewire/Project/Application/PollDeployment.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Project\Application;
|
||||
|
||||
use Livewire\Component;
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
|
||||
class PollDeployment extends Component
|
||||
{
|
||||
public $activity;
|
||||
public $isKeepAliveOn = true;
|
||||
public $deployment_uuid;
|
||||
|
||||
public function polling()
|
||||
{
|
||||
if ( is_null($this->activity) && isset($this->deployment_uuid)) {
|
||||
$this->activity = Activity::where('properties->deployment_uuid', '=', $this->deployment_uuid)
|
||||
->first();
|
||||
} else {
|
||||
$this->activity?->refresh();
|
||||
}
|
||||
|
||||
if (data_get($this->activity, 'properties.status') == 'finished' || data_get($this->activity, 'properties.status') == 'failed' ) {
|
||||
$this->isKeepAliveOn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user