Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ $gapDetection = new GapDetection(
// Configure retries in case a gap is detected
[
0, // First retry without any sleep time
10, // Second retry after 10 ms
30, // Wait another 30 ms before performing a third retry
10_000, // Second retry after 10 ms (10,000 μs)
30_000, // Wait another 30 ms before performing a third retry
],
\DateInterval('PT60S') //Set detection window to 60s
);
Expand Down
8 changes: 4 additions & 4 deletions src/Projection/GapDetection.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ final class GapDetection implements GapDetector
*/
private $retryConfig = [
0, // First retry is triggered immediately
5, // Second retry is triggered after 5ms
50, // Third retry with much longer sleep time
500, // Either DB is really busy or we have a real gap, wait another 500ms and run a last try
// Add more ms values if projection should perform more retries
5_000, // Second retry is triggered after 5ms
50_000, // Third retry with much longer sleep time
500_000, // Either DB is really busy or we have a real gap, wait another 500ms and run a last try
// Add more μs values if projection should perform more retries
];

/**
Expand Down