calypso.dispatchers.orchestrator.executor.local module

class calypso.dispatchers.orchestrator.executor.local.Local(name='local', **kwargs)

Bases: BaseExecutor

download_job(job: Job)

Download job files from the remote directory.

Parameters:

job (Job) – The job object containing paths and files to download.

download_remote_file(remote_file_name, local_file_name)
execute(command, timeout=3600, log_file=None)

Return output, error and code.

Parameters:
  • command (str or list of str) – Command on how to execute.

  • timeout (int, optional) – Timeout for the command, by default 3600.

Returns:

Dataclass including output, error and returncode.

Return type:

ProcInfo

files_exist(base_path, filenames)

Check if all specified files exist.

Parameters:
  • base_path (Path) – The base directory path.

  • filenames (list of str) – List of filenames to check.

Returns:

True if all files exist, False otherwise.

Return type:

bool

get_remote_file_obj(remote_file_name, mode='r') TextIOWrapper
make_remote_dir(remote_dir_name)
read_remote_file(remote_file_name)
rglob(remote_dir, pattern)
upload_file_to_remote(local_file_name, remote_file_name)
upload_job(job: Job)

Upload job files to the remote directory.

Parameters:

job (Job) – The job object containing paths and files to upload.

write_into_remote_file(data, remote_file_name)