chaturbate_poller.utils

Utility functions for the Chaturbate poller.

Attributes

logger

The module-level logger.

Classes

ChaturbateUtils

Utility functions for the Chaturbate poller.

Module Contents

chaturbate_poller.utils.logger

The module-level logger.

Type:

logging.Logger

class chaturbate_poller.utils.ChaturbateUtils[source]

Utility functions for the Chaturbate poller.

static get_max_tries() int[source]

Get the maximum number of tries for polling.

Returns:

The maximum number of tries.

Return type:

int

static backoff_handler(details: backoff._typing.Details) None[source]

Handle backoff events.

Parameters:

details (Details) – The backoff details.

static giveup_handler(details: backoff._typing.Details) None[source]

Handle giveup events.

Parameters:

details (Details) – The giveup details.

static need_retry(exception: Exception) bool[source]

Determine if the request should be retried based on the exception.

Parameters:

exception (Exception) – The exception raised.

Returns:

True if the request should be retried, False otherwise.

Return type:

bool