Refactor code and update destination component
This commit is contained in:
@@ -225,7 +225,8 @@ class Application extends BaseModel
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function isDeploymentInprogress() {
|
||||
public function isDeploymentInprogress()
|
||||
{
|
||||
$deployments = ApplicationDeploymentQueue::where('application_id', $this->id)->where('status', 'in_progress')->count();
|
||||
if ($deployments > 0) {
|
||||
return true;
|
||||
@@ -300,8 +301,9 @@ class Application extends BaseModel
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function isLogDrainEnabled() {
|
||||
return data_get($this, 'settings.is_log_drain_enabled', false);
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'settings.is_log_drain_enabled', false);
|
||||
}
|
||||
public function isConfigurationChanged($save = false)
|
||||
{
|
||||
|
||||
@@ -332,7 +332,6 @@ class Server extends BaseModel
|
||||
}
|
||||
|
||||
$uptime = instant_remote_process(['uptime'], $this, false);
|
||||
ray($uptime);
|
||||
if (!$uptime) {
|
||||
$this->settings()->update([
|
||||
'is_reachable' => false,
|
||||
@@ -345,7 +344,6 @@ class Server extends BaseModel
|
||||
$this->update([
|
||||
'unreachable_count' => 0,
|
||||
]);
|
||||
ray($this);
|
||||
}
|
||||
|
||||
if (data_get($this, 'unreachable_notification_sent') === true) {
|
||||
|
||||
Reference in New Issue
Block a user