Docker

class laminar.configurations.executors.Docker(concurrency: int = 1, timeout: int = 86400)

Bases: Executor

Execute layers in local Docker containers.

Usage:

Flow(executor=Docker())

Methods

submit

Execute a layer.

Attributes

concurrency

Number of tasks that can execute concurrently.

semaphore

Create a semaphore that limits asyncio concurrency.

timeout

Number of seconds to wait before automatically failing.

__init__(concurrency: int = 1, timeout: int = 86400)
concurrency : int = 1

Number of tasks that can execute concurrently.

property semaphore : Semaphore

Create a semaphore that limits asyncio concurrency.

Notes

Concurrency is controled by Executor.concurrency

Usage:

async with self.semaphore:
    ...
async submit(*, layer: Layer) Layer

Execute a layer.

Parameters
layer: Layer

Layer to execute.

timeout : int = 86400

Number of seconds to wait before automatically failing.