Skip to content

Commit

Permalink
fix: prevent squad update OOM issue with many squads (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
recursivetree authored Oct 8, 2024
1 parent 3ee76b4 commit ac4146f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Jobs/UpdateCharacterFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function tags()
*/
public function handle()
{
// without chunking, we can run out of memory on large installs
CharacterInfo::chunk(200, function ($characters) {
// Without chunking, we can run out of memory on large installs.
CharacterInfo::with('user.squads')->chunk(5, function ($characters) {
foreach ($characters as $character){
event(new CharacterFilterDataUpdate($character));
}
Expand Down

0 comments on commit ac4146f

Please sign in to comment.