Skip to main content

Timeout

Timeout class to define a timeout for a task. The task timeout can be set to a maximum runtime and a maximum queued time. Maximum runtime is the maximum time the task can run for (in one attempt). Maximum queued time is the maximum time the task can stay in the queue before it starts executing.

Attributes

  • max_runtime: timedelta | int

    • Maximum runtime for the task. If specified int, it will be converted to timedelta as seconds.
  • max_queued_time: timedelta | int | None = None

    • Maximum queued time for the task. If specified int, it will be converted to timedelta as seconds.

Constructors

  • Timeout class to define a timeout for a task. The task timeout can be set to a maximum runtime and a maximum queued time. Maximum runtime is the maximum time the task can run for (in one attempt). Maximum queued time is the maximum time the task can stay in the queue before it starts executing.

  • Parameters

    • max_runtime: timedelta | int
      • Maximum runtime for the task. If specified int, it will be converted to timedelta as seconds.
    • max_queued_time: timedelta | int | None
      • Maximum queued time for the task. If specified int, it will be converted to timedelta as seconds.