Skip to content

Commit

Permalink
Move $queue->remove outside loop
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Oct 17, 2024
1 parent ffb4dfa commit 740b33c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ public function send_saved_events_batch(): void {
$response = $subscriber->notify( $events );

// Due to an unidentified bug causing events to be resent, we are temporarily disabling retries.
$queue->remove( array_keys( $events ) );
continue;

if ( ! ( $subscriber instanceof HiiveConnection ) ) {
Expand All @@ -294,5 +293,8 @@ public function send_saved_events_batch(): void {
$queue->release( array_keys( $response['failedEvents'] ) );
}
}

// Due to an unidentified bug causing events to be resent, we are temporarily disabling retries.
$queue->remove( array_keys( $events ) );
}
}

0 comments on commit 740b33c

Please sign in to comment.