Skip to content

Commit

Permalink
v3.16.2.1 (#6769)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Lee <38788055+jeawhanlee@users.noreply.github.com>
Co-authored-by: Khadreal <Khadreal@users.noreply.github.com>
  • Loading branch information
4 people authored Jul 8, 2024
1 parent 14040c5 commit 7dab3a4
Show file tree
Hide file tree
Showing 8 changed files with 19,294 additions and 23,080 deletions.
2 changes: 1 addition & 1 deletion dynamic-lists-delayjs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dynamic-lists.json

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions inc/Engine/Preload/Controller/PreloadUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,19 @@ public function preload_url( string $url ) {
$duration = ( microtime( true ) - $start ); // Duration of the request.
}

$default_delay_between = 500000;

/**
* Filter the delay between each preload request.
*
* @param float $delay_between the defined delay.
* @param int $delay_between the defined delay.
*/
$delay_between = apply_filters( 'rocket_preload_delay_between_requests', 500000 );
$delay_between = apply_filters( 'rocket_preload_delay_between_requests', $default_delay_between );
$delay_between = absint( $delay_between );

if ( empty( $delay_between ) ) {
$delay_between = $default_delay_between;
}

usleep( $delay_between );

Expand Down
Loading

0 comments on commit 7dab3a4

Please sign in to comment.