Skip to content

Commit

Permalink
fixup! chg: [sync] Reduce chunk size when fetching sightings to solve…
Browse files Browse the repository at this point in the history
… HTTP timeouts
  • Loading branch information
JakubOnderka committed Mar 31, 2024
1 parent 83bbdaa commit 5f6e231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Model/Sighting.php
Expand Up @@ -1442,7 +1442,7 @@ private function pullSightingNewWay(array $user, array $eventUuids, ServerSyncTo
shuffle($uuids); // shuffle array to avoid keeping events with a lof ot sightings in same batch all the time
$saved = 0;
$savedEventUuids = [];
foreach (array_chunk($uuids, 50) as $chunk) {
foreach (array_chunk($uuids, 25) as $chunk) {
try {
$sightings = $serverSync->fetchSightingsForEvents($chunk);
} catch (Exception $e) {
Expand Down

0 comments on commit 5f6e231

Please sign in to comment.