Event Polling

This project exposes a framework for dynamically polling on long-running Linode Events.

See the Event Polling Guide for more details.

EventPoller class

class linode_api4.EventPoller(client: LinodeClient, entity_type: str, action: str, entity_id: int = None)[source]

EventPoller allows modules to dynamically poll for Linode events

set_entity_id(entity_id: int) None[source]

Sets the ID of the entity to filter on. This is useful for create operations where the entity id might not be known in __init__.

Parameters:

entity_id (int) – The ID of the entity to poll for.

wait_for_next_event(timeout: int = 240, interval: int = 5) Event[source]

Waits for and returns the next event matching the poller’s configuration.

Parameters:
  • timeout (int) – The timeout in seconds before this polling operation will fail.

  • interval (int) – The time in seconds to wait between polls.

Returns:

The resulting event.

Return type:

Event

wait_for_next_event_finished(timeout: int = 240, interval: int = 5) Event[source]

Waits for the next event to enter status finished or notification.

Parameters:
  • timeout (int) – The timeout in seconds before this polling operation will fail.

  • interval (int) – The time in seconds to wait between polls.

Returns:

The resulting event.

Return type:

Event