X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=twitter%2Ftwitter_sync.php;h=bd4c4444f5c12bc621385b4dd64ec4aab1f231d0;hb=86b2d830a5da62f90c22b5d3f15921a60de25f37;hp=ed9f3f852406393161c9aff68cb8ad2aa7344359;hpb=c431befd8e82db9b44d50118cf10dc2d88a5f15f;p=friendica-addons.git diff --git a/twitter/twitter_sync.php b/twitter/twitter_sync.php index ed9f3f85..bd4c4444 100644 --- a/twitter/twitter_sync.php +++ b/twitter/twitter_sync.php @@ -1,15 +1,18 @@ Config::get('system', 'maxloadavg', 50)) { - logger('system: load ' . $load[0] . ' too high. Twitter sync deferred to next scheduled run.'); + 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.'); return; } } @@ -27,4 +30,3 @@ function twitter_sync_run($argv, $argc) { twitter_fetchhometimeline($a, $uid); } } -?>