Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.sites.task_chain.task_chain_runner

The task chain runner running on remote sites.

Classes

TaskChainRunner

class TaskChainRunner(builtins.object):
    def __init__(
        self,
        site: salvus.flow.sites.base_site.BaseSite,
        task_chain_tasks: Dict[str, List],
        task_chain_site_config: salvus.flow.sites.task_chain.task_chain_site_config.TaskChainSiteConfig,
        context: Optional[Callable] = None,
    ):
        ...

The task chain runner - it will launch a remote task chain that will spawn the local task chain runner.

Parameters
  • site salvus.flow.sites.base_site.BaseSite — The site the task chain runner will run on.
  • task_chain_tasks Dict[str, List] — Dictionary of (identifer, tasks) for each task chain to be run on the remote site.
  • task_chain_site_config salvus.flow.sites.task_chain.task_chain_site_config.TaskChainSiteConfig — The site configuration for that site.
  • context Optional[Callable] — A optional function returning a context manager that will be used prior to spawning the local task chain runners.
Methods
delete_remote_files()
def delete_remote_files(self, verbosity: int = 1) -> None:
    ...

Delete all remote files for this task chain runner.

Parameters
  • verbosity int — The verbosity.
Returns None
get_status_for_all_task_chains()
def get_status_for_all_task_chains(
    self,
) -> Dict[str, Union[salvus.flow.sites.types.JobStatus, NoneType]]:
    ...

Get a dictionary with the status of every individual task chain.

This is most useful after the controller finished running.

Returns Dict[str, Union[salvus.flow.sites.types.JobStatus, NoneType]]
launch()
def launch(self) -> None:
    ...

Asynchronously launch the remote task chain runner. Returns immediately.

Returns None
update_status()
def update_status(
    self, force_update: bool = False
) -> salvus.flow.sites.types.JobStatus:
    ...

Update the status of the remote task chain runner.

Parameters
  • force_update bool — Normally it would only check at most once per a site’s recommended update interval. If this is True, it will check regardless.
Returns salvus.flow.sites.types.JobStatus