bartender.destinations#

Classes#

DestinationConfig

Configuration for job destination.

Destination

A destination is a combination of a scheduler and optional filesystem.

Functions#

default_destinations(→ dict[str, DestinationConfig])

Default destinations when empty dict was given as Config.destinations.

build(→ dict[str, Destination])

Build job destinations dictionary from a configuration dictionary.

build_destination(→ Destination)

Build job destination from configuration.

Module Contents#

class bartender.destinations.DestinationConfig#

Bases: pydantic.BaseModel

Configuration for job destination.

scheduler: bartender.schedulers.build.SchedulerConfig#
filesystem: bartender.filesystems.build.FileSystemConfig#
bartender.destinations.default_destinations() dict[str, DestinationConfig]#

Default destinations when empty dict was given as Config.destinations.

Returns:

Dict with local in-memory scheduler and file system.

Return type:

dict[str, DestinationConfig]

class bartender.destinations.Destination#

A destination is a combination of a scheduler and optional filesystem.

scheduler: bartender.schedulers.abstract.AbstractScheduler#
filesystem: bartender.filesystems.abstract.AbstractFileSystem#
async close() None#

Cleanup destination.

A job destination can have connections to remote systems. Call this method to clean those up.

Return type:

None

bartender.destinations.build(config: dict[str, DestinationConfig]) dict[str, Destination]#

Build job destinations dictionary from a configuration dictionary.

Parameters:

config (dict[str, DestinationConfig]) – The configuration dictionary.

Returns:

Job destinations dictionary

Return type:

dict[str, Destination]

bartender.destinations.build_destination(config: DestinationConfig) Destination#

Build job destination from configuration.

Parameters:

config (DestinationConfig) – Configuration for a destination.

Returns:

A job destination.

Return type:

Destination