Skip to content

Commit

Permalink
Merge pull request #687 from biigle/patch-1
Browse files Browse the repository at this point in the history
Fix chunk size of clone volume job
  • Loading branch information
mzur authored Oct 27, 2023
2 parents 6798696 + 25d7a52 commit a105cb6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Jobs/CloneImagesOrVideos.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ private function copyImages($volume, $copy, $selectedImageIds)
$original['uuid'] = (string)Uuid::uuid4();
unset($original['id']);
return $original;
})->chunk(10000)->each(function ($chunk) {
})
->chunk(1000)
->each(function ($chunk) {
Image::insert($chunk->toArray());
});

Expand Down Expand Up @@ -357,7 +359,9 @@ private function copyVideos($volume, $copy, $selectedVideoIds)
$original['uuid'] = (string)Uuid::uuid4();
unset($original['id']);
return $original;
})->chunk(10000)->each(function ($chunk) {
})
->chunk(1000)
->each(function ($chunk) {
Video::insert($chunk->toArray());
});

Expand Down

0 comments on commit a105cb6

Please sign in to comment.