swh.objstorage.backends.winery.settings module#

class swh.objstorage.backends.winery.settings.Packer[source]#

Bases: TypedDict

Settings for the packer process, either external or internal

create_images: NotRequired[bool]#

Whether to create the images

pack_immediately: NotRequired[bool]#

Immediately pack shards (in a separate thread) when overflowing

clean_immediately: NotRequired[bool]#

Immediately clean shards when packing is complete

swh.objstorage.backends.winery.settings.packer_settings_with_defaults(values: Packer) Packer[source]#

Hydrate Packer settings with default values

class swh.objstorage.backends.winery.settings.Shards[source]#

Bases: TypedDict

Settings for shard management

max_size: int#

Maximum cumulative size of objects in a shard

rw_idle_timeout: NotRequired[float]#

Timeout (seconds) after which write shards get released when idle

swh.objstorage.backends.winery.settings.shards_settings_with_defaults(values: Shards) Shards[source]#

Hydrate Shards settings with default values

class swh.objstorage.backends.winery.settings.ShardsPool[source]#

Bases: TypedDict

Settings for the Shards pool

type: Literal['rbd', 'directory']#
class swh.objstorage.backends.winery.settings.RbdShardsPool[source]#

Bases: ShardsPool, TypedDict

Settings for the Ceph RBD-based Shards pool

use_sudo: NotRequired[bool]#
map_options: NotRequired[str]#
pool_name: NotRequired[str]#
data_pool_name: NotRequired[str | None]#
image_features_unsupported: NotRequired[Tuple[str, ...]]#
type: Literal['rbd', 'directory']#
swh.objstorage.backends.winery.settings.rbd_shards_pool_settings_with_defaults(values: ShardsPool) RbdShardsPool[source]#

Hydrate RbdShards settings with default values

class swh.objstorage.backends.winery.settings.DirectoryShardsPool[source]#

Bases: ShardsPool, TypedDict

Settings for the File-based Shards pool

base_directory: str#
pool_name: NotRequired[str]#
type: Literal['rbd', 'directory']#
swh.objstorage.backends.winery.settings.directory_shards_pool_settings_with_defaults(values: ShardsPool) DirectoryShardsPool[source]#

Hydrate RbdShards settings with default values

class swh.objstorage.backends.winery.settings.Throttler[source]#

Bases: TypedDict

Settings for the winery throttler

db: NotRequired[str]#

Throttler database connection string

max_read_bps: int#

Max read bytes per second

max_write_bps: int#

Max write bytes per second

class swh.objstorage.backends.winery.settings.Database[source]#

Bases: TypedDict

Settings for the winery database

db: str#

Database connection string

application_name: NotRequired[str | None]#

Application name for the database connection

swh.objstorage.backends.winery.settings.database_settings_with_defaults(values: Database) Database[source]#

Hydrate Database settings with defaults

class swh.objstorage.backends.winery.settings.Winery[source]#

Bases: TypedDict

A representation of all available winery settings

database: Database#
shards: Shards#
shards_pool: ShardsPool#
throttler: Throttler | None#
packer: Packer#
swh.objstorage.backends.winery.settings.populate_default_settings(database: Database | None = None, shards: Shards | None = None, shards_pool: ShardsPool | None = None, throttler: Throttler | None = None, packer: Packer | None = None) Winery[source]#

Given some settings for a Winery objstorage, add all the appropriate default settings.