ソースを参照

Update FollowServiceWarmCache

Daniel Supernault 1 年間 前
コミット
fe9b4c5a37
1 ファイル変更1 行追加1 行削除
  1. 1 1
      app/Jobs/FollowPipeline/FollowServiceWarmCache.php

+ 1 - 1
app/Jobs/FollowPipeline/FollowServiceWarmCache.php

@@ -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;
                 }
                 }