Module rugged.workers

The rugged.workers library defines the base class and implementations for all the workers in the Rugged system.

Sub-modules

rugged.workers.base_worker
rugged.workers.monitor-worker
rugged.workers.root-worker
rugged.workers.snapshot-worker
rugged.workers.targets-worker
rugged.workers.test-worker
rugged.workers.timestamp-worker

Functions

def get_workers(workers={}, tuf_only: bool = False)
Expand source code
def get_workers(workers={}, tuf_only: bool = False):
    """ Return a list of given workers; default to all workers. """
    workers = list(workers)
    # If workers have been specified, then just return that list.
    if workers:
        if tuf_only:
            return _only_tuf_workers(workers)
        return workers
    # if no workers were specified, look them up from config.
    for key, worker in config['workers'].get().items():
        workers.append(worker['name'])
    if tuf_only:
        return _only_tuf_workers(workers)
    return workers

Return a list of given workers; default to all workers.