ahriman.application.application.workers package
Submodules
ahriman.application.application.workers.local_updater module
- class LocalUpdater(repository: Repository)
Bases:
Updater
local build process implementation
- repository
repository instance
- Type:
default constructor
- Parameters:
repository (Repository) – repository instance
- partition(packages: Iterable[Package]) list[list[Package]]
split packages into partitions to be processed by this worker
ahriman.application.application.workers.remote_updater module
- class RemoteUpdater(workers: list[Worker], repository_id: RepositoryId, configuration: Configuration)
Bases:
Updater
remote update worker
- configuration
configuration instance
- Type:
- repository_id
repository unique identifier
- Type:
default constructor
- Parameters:
workers (list[Worker]) – worker identifiers
repository_id (RepositoryId) – repository unique identifier
configuration (Configuration) – configuration instance
- next_worker() tuple[Worker, SyncAhrimanClient]
generate next not-used web client. In case if all clients have been already used, it yields next not used client
- Returns:
worker and constructed client instance for the web
- Return type:
tuple[Worker, SyncAhrimanClient]
- partition(packages: Iterable[Package]) list[list[Package]]
split packages into partitions to be processed by this worker
- update(updates: Iterable[Package], packagers: Packagers | None = None, *, bump_pkgrel: bool = False) Result
run package updates
- Parameters:
- Returns:
update result
- Return type:
- property clients: dict[Worker, SyncAhrimanClient]
extract loaded clients. Note that this method yields only workers which have been already loaded
- Returns:
map of the worker to the related web client
- Return type:
dict[Worker, SyncAhrimanClient]
ahriman.application.application.workers.updater module
- class Updater
Bases:
LazyLogging
updater handler interface
- static load(repository_id: RepositoryId, configuration: Configuration, repository: Repository, workers: list[Worker] | None = None) Updater
construct updaters from parameters
- Parameters:
repository_id (RepositoryId) – repository unique identifier
configuration (Configuration) – configuration instance
repository (Repository) – repository instance
workers (list[Worker] | None, optional) – worker identifiers if any (Default value = None)
- Returns:
constructed updater worker
- Return type:
- partition(packages: Iterable[Package]) list[list[Package]]
split packages into partitions to be processed by this worker