Skip to content

Commit

Permalink
Reduce max number of events sent from 100 to 50
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Oct 17, 2024
1 parent 5f2e6f9 commit ffb4dfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion includes/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function send_saved_events_batch(): void {
*
* @var array<int,Event> $events
*/
$events = $queue->pull( 100 );
$events = $queue->pull( 50 );

// If queue is empty, do nothing.
if ( empty( $events ) ) {
Expand Down
10 changes: 5 additions & 5 deletions tests/phpunit/includes/EventManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function () use ( $batch_queue_mock ) {
public function test_send_saved_events_happy_path_no_failed_events(): void {

$this->markTestSkipped( 'Due to an unidentified bug causing events to be resent, we are temporarily disabling retries.' );

$batch_queue_mock = Mockery::mock( BatchQueue::class );

\Patchwork\redefine(
Expand Down Expand Up @@ -317,7 +317,7 @@ function () use ( $batch_queue_mock ) {

$batch_queue_mock->expects( 'pull' )
->once()
->with( 100 )
->with( 50 )
->andReturn(
array(
15 => $event,
Expand Down Expand Up @@ -386,7 +386,7 @@ function () use ( $batch_queue_mock ) {

$batch_queue_mock->expects( 'pull' )
->once()
->with( 100 )
->with( 50 )
->andReturn(
array(
15 => $event,
Expand Down Expand Up @@ -449,7 +449,7 @@ function () use ( $batch_queue_mock ) {

$batch_queue_mock->expects( 'pull' )
->once()
->with( 100 )
->with( 50 )
->andReturn(
array(
16 => $event,
Expand Down Expand Up @@ -721,7 +721,7 @@ function () use ( $batch_queue_mock ) {

$batch_queue_mock->expects( 'pull' )
->once()
->with( 100 )
->with( 50 )
->andReturn(
array(
15 => $event,
Expand Down

0 comments on commit ffb4dfa

Please sign in to comment.