fix(core): add server functionality check before dispatching container status
This commit is contained in:
parent
09133d7d46
commit
40ad118492
2 changed files with 7 additions and 3 deletions
|
|
@ -43,8 +43,10 @@ public function activityFinished()
|
||||||
|
|
||||||
public function check_status($showNotification = false)
|
public function check_status($showNotification = false)
|
||||||
{
|
{
|
||||||
GetContainersStatus::run($this->database->destination->server);
|
if ($this->database->destination->server->isFunctional()) {
|
||||||
$this->database->refresh();
|
GetContainersStatus::dispatch($this->database->destination->server);
|
||||||
|
}
|
||||||
|
|
||||||
if ($showNotification) {
|
if ($showNotification) {
|
||||||
$this->dispatch('success', 'Database status updated.');
|
$this->dispatch('success', 'Database status updated.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,9 @@ public function restartDatabase($id)
|
||||||
public function check_status()
|
public function check_status()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
GetContainersStatus::run($this->service->server);
|
if ($this->service->server->isFunctional()) {
|
||||||
|
GetContainersStatus::dispatch($this->service->server);
|
||||||
|
}
|
||||||
$this->service->applications->each(function ($application) {
|
$this->service->applications->each(function ($application) {
|
||||||
$application->refresh();
|
$application->refresh();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue