mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 10:49:22 +02:00
Update StatusService.php
This commit is contained in:
parent
8e86b8c015
commit
56e501f8f6
@ -46,12 +46,13 @@ class StatusService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($config['lua']['statustimeout'])) {
|
$configStatustimeout = configLua('statustimeout');
|
||||||
$config['lua']['statusTimeout'] = $config['lua']['statustimeout'];
|
if(isset($configStatustimeout)) {
|
||||||
|
configLua(['statusTimeout', $configStatustimeout]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get status timeout from server config
|
// get status timeout from server config
|
||||||
$status_timeout = eval('return ' . $config['lua']['statusTimeout'] . ';') / 1000 + 1;
|
$status_timeout = eval('return ' . configLua('statusTimeout') . ';') / 1000 + 1;
|
||||||
$status_interval = setting('core.status_interval');
|
$status_interval = setting('core.status_interval');
|
||||||
if($status_interval && $status_timeout < $status_interval) {
|
if($status_interval && $status_timeout < $status_interval) {
|
||||||
$status_timeout = $status_interval;
|
$status_timeout = $status_interval;
|
||||||
@ -60,8 +61,6 @@ class StatusService
|
|||||||
if($status['lastCheck'] + $status_timeout < time()) {
|
if($status['lastCheck'] + $status_timeout < time()) {
|
||||||
return $this->updateStatus();
|
return $this->updateStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache = app()->get('cache');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateStatus(): array
|
public function updateStatus(): array
|
||||||
@ -130,5 +129,7 @@ class StatusService
|
|||||||
registerDatabaseConfig('status_' . $key, $value);
|
registerDatabaseConfig('status_' . $key, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user