swh.scheduler package

Module contents

swh.scheduler.compute_nb_tasks_from(num_tasks)[source]
Compute and returns the tuple, number of tasks without priority,

number of tasks with priority.

Parameters

num_tasks (int) –

Returns

tuple number of tasks without priority (int), number of tasks with priority (int)

swh.scheduler.get_scheduler(cls: str, **kwargs) → SchedulerInterface[source]

Get a scheduler object of class cls with arguments **kwargs.

Parameters
  • cls – scheduler’s class, either ‘local’ or ‘remote’

  • kwargs – arguments to pass to the class’ constructor

Returns

local: swh.scheduler.backend.SchedulerBackend remote: swh.scheduler.api.client.RemoteScheduler

Return type

an instance of swh.scheduler, either local or remote

Raises

ValueError if passed an unknown storage class.