move inbox insert code to status saver main loop
This commit is contained in:
parent
20f6ea4840
commit
184ee7fc1f
@ -222,7 +222,11 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->saveStatus($status, $flink);
|
$notice = $this->saveStatus($status);
|
||||||
|
|
||||||
|
if (!empty($notice)) {
|
||||||
|
Inbox::insertNotice($flink->user_id, $notice->id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Okay, record the time we synced with Twitter for posterity
|
// Okay, record the time we synced with Twitter for posterity
|
||||||
@ -231,7 +235,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
|||||||
$flink->update();
|
$flink->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveStatus($status, $flink=null)
|
function saveStatus($status)
|
||||||
{
|
{
|
||||||
$profile = $this->ensureProfile($status->user);
|
$profile = $this->ensureProfile($status->user);
|
||||||
|
|
||||||
@ -320,9 +324,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
|||||||
Event::handle('EndNoticeSave', array($notice));
|
Event::handle('EndNoticeSave', array($notice));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($flink)) {
|
|
||||||
Inbox::insertNotice($flink->user_id, $notice->id);
|
|
||||||
}
|
|
||||||
$notice->blowOnInsert();
|
$notice->blowOnInsert();
|
||||||
|
|
||||||
return $notice;
|
return $notice;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user