Class - ConstantBackoff#

class openfl.transport.grpc.aggregator_client.ConstantBackoff(reconnect_interval, uri)[source]#

Bases: object

Constant Backoff policy.

This class implements a backoff policy that waits for a constant amount of time between retries.

reconnect_interval#

The interval between connection attempts.

Type:

int

uri#

The URI to connect to.

Type:

str

__init__(reconnect_interval, uri)[source]#

Initialize Constant Backoff.

Parameters:
  • reconnect_interval (int) – The interval between connection attempts.

  • uri (str) – The URI to connect to.

Methods

__init__(reconnect_interval, uri)

Initialize Constant Backoff.

sleep()

Sleep for specified interval.

sleep()[source]#

Sleep for specified interval.