Update FollowServiceWarmCache

This commit is contained in:
Daniel Supernault 2023-12-03 03:05:00 -07:00
parent 1ef885c1a1
commit fe9b4c5a37
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -73,7 +73,7 @@ class FollowServiceWarmCache implements ShouldQueue
if(Follower::whereProfileId($id)->orWhere('following_id', $id)->count()) { if(Follower::whereProfileId($id)->orWhere('following_id', $id)->count()) {
$following = []; $following = [];
$followers = []; $followers = [];
foreach(Follower::lazy() as $follow) { foreach(Follower::where('following_id', $id)->orWhere('profile_id', $id)->lazyById(500) as $follow) {
if($follow->following_id != $id && $follow->profile_id != $id) { if($follow->following_id != $id && $follow->profile_id != $id) {
continue; continue;
} }