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