MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / __init__

Method __init__

crates/pyhq/python/hyperqueue/job.py:19–38  ·  view source on GitHub ↗

:param default_workdir: Default working directory for tasks. :param max_fails: How many tasks can fail before the whole job will be cancelled. :param default_env: Environment variables that will be automatically set for each task in this job. :param name: Nam

(
        self,
        default_workdir: Optional[GenericPath] = None,
        max_fails: Optional[int] = 1,
        default_env: Optional[EnvType] = None,
        name: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

17 """
18
19 def __init__(
20 self,
21 default_workdir: Optional[GenericPath] = None,
22 max_fails: Optional[int] = 1,
23 default_env: Optional[EnvType] = None,
24 name: Optional[str] = None,
25 ):
26 """
27 :param default_workdir: Default working directory for tasks.
28 :param max_fails: How many tasks can fail before the whole job will be cancelled.
29 :param default_env: Environment variables that will be automatically set for each task in
30 this job.
31 :param name: Name of the job.
32 """
33 self.tasks: List[Task] = []
34 self.task_map: Dict[TaskId, Task] = {}
35 self.max_fails = max_fails
36 self.default_workdir = Path(default_workdir).resolve() if default_workdir is not None else default_workdir
37 self.default_env = default_env or {}
38 self.name = name
39
40 def task_by_id(self, id: TaskId) -> Optional[Task]:
41 """

Callers

nothing calls this directly

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected