Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

cesm_hawc.dispatch

cesm_hawc.dispatch

source

Run independent jobs serially or across a pool of worker processes.

run_jobs

def run_jobs(
    fn: Callable,
    jobs: list[tuple],
    n_workers: int,
    max_tasks_per_child: int | None = None,
    on_result: Callable[[object], None] | None = None,
) -> list

source

Run fn(*job) for every job, serially or in parallel.

Parameters

Returns

Raises

Notes

cesm-hawc’s job functions return a status string starting with "OK" or "FAIL", but this function doesn’t depend on the result type.