Skip to content

_submit_setup

Submodule to define _local_submit_setup

_local_submit_setup(*, wftask, workflow_dir_local=None, workflow_dir_remote=None, which_type)

Collect WorfklowTask-specific configuration parameters from different sources, and inject them for execution.

Parameters:

Name Type Description Default
wftask WorkflowTaskV2

WorkflowTask for which the configuration is to be assembled

required
workflow_dir_local Optional[Path]

Not used in this function.

None
workflow_dir_remote Optional[Path]

Not used in this function.

None

Returns:

Name Type Description
submit_setup_dict dict[str, object]

A dictionary that will be passed on to FractalThreadPoolExecutor.submit and FractalThreadPoolExecutor.map, so as to set extra options.

Source code in fractal_server/app/runner/v2/_local/_submit_setup.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
def _local_submit_setup(
    *,
    wftask: WorkflowTaskV2,
    workflow_dir_local: Optional[Path] = None,
    workflow_dir_remote: Optional[Path] = None,
    which_type: Literal["non_parallel", "parallel"],
) -> dict[str, object]:
    """
    Collect WorfklowTask-specific configuration parameters from different
    sources, and inject them for execution.

    Arguments:
        wftask:
            WorkflowTask for which the configuration is to be assembled
        workflow_dir_local:
            Not used in this function.
        workflow_dir_remote:
            Not used in this function.

    Returns:
        submit_setup_dict:
            A dictionary that will be passed on to
            `FractalThreadPoolExecutor.submit` and
            `FractalThreadPoolExecutor.map`, so as to set extra options.
    """

    local_backend_config = get_local_backend_config(
        wftask=wftask, which_type=which_type
    )

    return dict(local_backend_config=local_backend_config)