ppg2.FileGeneratingJob #
A Job that creates a single file.
ppg2.FileGeneratingJob(
job_id: str,
callback_function: Callable[[Path], None],
resources: Resources,
depend_on_function: bool = True,
empty_ok: bool = False,
always_capture_output: bool = False
) -> None
- job_id -> The filename to create. Maybe a string or path
callback_function
takes a single parameter: ThePath
of the file to create.- resources: See Resources.
- depend_on_function: Whether to create a FunctionInvariant for the callback_function. See FunctionInvariant.
- empty_ok: If it’s ok when the job creates an empty file. Otherwise an exception is raised and the job fails.
- always_capture_output - if True, the job’s stdout/stderr are stored on
job.stdout
/job.stderr
. Otherwise they’re discarded in a successful run