Преглед на файлове

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()) {
             $following = [];
             $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) {
                     continue;
                 }