AsyncBatchProcessor

class farn.run.batchProcess.AsyncBatchProcessor(case_list_file: Path, command: str, timeout: int = 3600, max_number_of_cpus: int = 0)

Bases: object

Batch processor for asynchroneous execution of a shell command in multiple case folders.

__init__(case_list_file: Path, command: str, timeout: int = 3600, max_number_of_cpus: int = 0) None

Instantiate an asynchroneous batch processor to execute a shell command in multiple case folders.

Parameters:
  • case_list_file (Path) – the file containing the list of case folders the shell command shall be executed in

  • command (str) – the shell command to be executed

  • timeout (int, optional) – time out in seconds, by default 3600

  • max_number_of_cpus (int, optional) – number of cpus to be used, by default 0

Methods

__init__(case_list_file, command[, timeout, ...])

Instantiate an asynchroneous batch processor to execute a shell command in multiple case folders.

run()

Run the shell command in all case folders.

run() None

Run the shell command in all case folders.