INNER CODE UNIT · Python

retry_delay

ChrispyBacon-dev/DockFlare · dockflare-agent/app/main.py:437

                        retry_delay = (2 ** attempt) + random.random()
                    time.sleep(retry_delay)
                    continue
            logging.error("Master rejected Agent request (status=%s, code=%s)", response.status_code, code)
            return False
        except requests.exceptions.RequestException as exc:
            if attempt == 2:
                logging.error("Agent request failed after bounded retries: %s", type(exc).__name__)
                return False
            time.sleep((2 ** attempt) + random.random())
    return False


def report_event_to_master(event_type, container_data=None):
    """
    Sends a JSON payload to the master's reporting endpoint.
    """
    if not AGENT_ID or decommission_tombstone:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…