3 use Friendica\Core\Logger;
6 function twitter_sync_run($argv, $argc)
8 require_once 'addon/twitter/twitter.php';
10 if (function_exists('sys_getloadavg')) {
11 $load = sys_getloadavg();
12 $maxload = DI::config()->get('system', 'maxloadavg', 50);
13 if (intval($load[0]) > $maxload) {
14 Logger::notice('load too high. Twitter sync deferred to next scheduled run.', ['current' => $load[0], 'max' => $maxload]);
23 $mode = intval($argv[1]);
24 $uid = intval($argv[2]);
27 twitter_fetchtimeline($uid);
28 } elseif ($mode == 2) {
29 twitter_fetchhometimeline($uid);