Twitter: improved logging
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user