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

Function format_workers

crates/hyperqueue/src/client/output/cli.rs:1525–1542  ·  view source on GitHub ↗
(ids: Option<&[WorkerId]>, worker_map: &'a WorkerMap)

Source from the content-addressed store, hash-verified

1523}
1524
1525fn format_workers<'a>(ids: Option<&[WorkerId]>, worker_map: &'a WorkerMap) -> Cow<'a, str> {
1526 match ids {
1527 Some(ids) => {
1528 if ids.len() == 1 {
1529 format_worker(ids[0], worker_map).into()
1530 } else {
1531 assert!(!ids.is_empty());
1532 let mut result = String::new();
1533 for id in ids {
1534 result.push_str(format_worker(*id, worker_map));
1535 result.push('\n');
1536 }
1537 result.into()
1538 }
1539 }
1540 None => "".into(),
1541 }
1542}
1543
1544fn get_task_time(state: &JobTaskState) -> (Option<DateTime<Utc>>, Option<DateTime<Utc>>) {
1545 match state {

Callers

nothing calls this directly

Calls 4

format_workerFunction · 0.85
intoMethod · 0.80
pushMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected