mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-12 03:18:48 +00:00
Twitter: improved logging
This commit is contained in:
parent
83df923675
commit
98b1d4990b
2 changed files with 52 additions and 59 deletions
|
@ -11,8 +11,9 @@ function twitter_sync_run($argv, $argc)
|
|||
|
||||
if (function_exists('sys_getloadavg')) {
|
||||
$load = sys_getloadavg();
|
||||
if (intval($load[0]) > DI::config()->get('system', 'maxloadavg', 50)) {
|
||||
Logger::log('system: load ' . $load[0] . ' too high. Twitter sync deferred to next scheduled run.');
|
||||
$maxload = DI::config()->get('system', 'maxloadavg', 50);
|
||||
if (intval($load[0]) > $maxload) {
|
||||
Logger::notice('load too high. Twitter sync deferred to next scheduled run.', ['current' => $load[0], 'max' => $maxload]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue