swh.scheduler.cli.task_type module#
- swh.scheduler.cli.task_type.ensure_task_type(task_module: str, task_type_name: str, swhtask: SWHTask, task_config: Dict[str, Any], scheduler)[source]#
Ensure a given task-type (for the task_module) exists in the scheduler.
- Parameters:
task_module – task module we are currently checking for task type consistency
task_type – the type of the task to check/insert (correspond to the ‘type’ field in the db)
swhtask – the SWHTask instance the task-type correspond to
task_config – a dict with specific/overloaded values for the task-type to be created
scheduler – the scheduler object used to access the scheduler db