gpb_ics_sync_retry_delay

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Use linear retry delays (10m, 20m, 30m…).

Description

Filter the retry delay calculation. Default uses exponential backoff: 5 minutes, 15 minutes, 60 minutes

Usage

Applied globally

add_filter( 'gpb_ics_sync_retry_delay', 'my_custom_function' );

Parameters

$delay int

The calculated delay in seconds.

$attempt int

The attempt number (1-based).

$config_id int

The calendar config ID.

$object_id int

The bookable object ID.

$object_type string

The bookable object type.

Examples

Use linear retry delays (10m, 20m, 30m…).

add_filter( 'gpb_ics_sync_retry_delay', function ( $delay, $attempt ) {
    return $attempt * 10 * MINUTE_IN_SECONDS;
}, 10, 2 );