openfl.transport.grpc.aggregator_client.ConstantBackoff#

class openfl.transport.grpc.aggregator_client.ConstantBackoff(reconnect_interval, logger, 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

logger#

The logger to use for reporting connection attempts.

Type:

Logger

uri#

The URI to connect to.

Type:

str

__init__(reconnect_interval, logger, uri)[source]#

Initialize Constant Backoff.

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

  • logger (Logger) – The logger to use for reporting connection attempts.

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

Methods

__init__(reconnect_interval, logger, uri)

Initialize Constant Backoff.

sleep()

Sleep for specified interval.

sleep()[source]#

Sleep for specified interval.