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

Function get_task_paths

crates/hyperqueue/src/client/output/cli.rs:1581–1599  ·  view source on GitHub ↗

Returns Option(working directory, stdout, stderr)

(
    task_map: &TaskToPathsMap,
    task_id: JobTaskId,
)

Source from the content-addressed store, hash-verified

1579
1580/// Returns Option(working directory, stdout, stderr)
1581fn get_task_paths(
1582 task_map: &TaskToPathsMap,
1583 task_id: JobTaskId,
1584) -> (Option<&str>, Option<&str>, Option<&str>) {
1585 match task_map[&task_id] {
1586 Some(ref paths) => (
1587 Some(paths.cwd.to_str().unwrap()),
1588 match &paths.stdout {
1589 StdioDef::File { path, .. } => Some(path.to_str().unwrap()),
1590 _ => None,
1591 },
1592 match &paths.stderr {
1593 StdioDef::File { path, .. } => Some(path.to_str().unwrap()),
1594 _ => None,
1595 },
1596 ),
1597 None => (None, None, None),
1598 }
1599}
1600
1601/// Returns (working directory, stdout, stderr)
1602fn format_task_paths(task_map: &TaskToPathsMap, task_id: JobTaskId) -> (&str, &str, &str) {

Callers 1

print_job_outputFunction · 0.85

Calls 1

to_strMethod · 0.80

Tested by

no test coverage detected