2 use Friendica\Core\Config;
4 function twitter_sync_run($argv, $argc) {
7 require_once("addon/twitter/twitter.php");
9 if (function_exists('sys_getloadavg')) {
10 $load = sys_getloadavg();
11 if (intval($load[0]) > Config::get('system', 'maxloadavg', 50)) {
12 logger('system: load ' . $load[0] . ' too high. Twitter sync deferred to next scheduled run.');
21 $mode = intval($argv[1]);
22 $uid = intval($argv[2]);
25 twitter_fetchtimeline($a, $uid);
26 } elseif ($mode == 2) {
27 twitter_fetchhometimeline($a, $uid);