mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-11 19:08:49 +00:00
Twitter: The sync process is split into several short processes
This commit is contained in:
parent
ec5e1bf421
commit
9f18d7e6de
2 changed files with 89 additions and 2 deletions
|
@ -625,7 +625,12 @@ function twitter_cron($a,$b) {
|
|||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
logger('twitter: fetching for user '.$rr['uid']);
|
||||
twitter_fetchtimeline($a, $rr['uid']);
|
||||
|
||||
if (get_config("system", "worker")) {
|
||||
proc_run(PRIORITY_MEDIUM, "addon/twitter/twitter_sync.php", 1, $rr['uid']);
|
||||
} else {
|
||||
twitter_fetchtimeline($a, $rr['uid']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -647,8 +652,12 @@ function twitter_cron($a,$b) {
|
|||
}
|
||||
|
||||
logger('twitter: importing timeline from user '.$rr['uid']);
|
||||
twitter_fetchhometimeline($a, $rr["uid"]);
|
||||
|
||||
if (get_config("system", "worker")) {
|
||||
proc_run(PRIORITY_MEDIUM, "addon/twitter/twitter_sync.php", 2, $rr['uid']);
|
||||
} else {
|
||||
twitter_fetchhometimeline($a, $rr["uid"]);
|
||||
}
|
||||
/*
|
||||
// To-Do
|
||||
// check for new contacts once a day
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue