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

Function command_worker_list

crates/hyperqueue/src/bin/hq.rs:241–258  ·  view source on GitHub ↗
(
    gsettings: &GlobalSettings,
    opts: WorkerListOpts,
)

Source from the content-addressed store, hash-verified

239}
240
241async fn command_worker_list(
242 gsettings: &GlobalSettings,
243 opts: WorkerListOpts,
244) -> anyhow::Result<()> {
245 let mut session = get_client_session(gsettings.server_directory()).await?;
246
247 let filter = opts.filter.or({
248 if opts.all {
249 None
250 } else {
251 Some(WorkerFilter::Running)
252 }
253 });
254
255 let workers = get_worker_list(&mut session, filter).await?;
256 gsettings.printer().print_worker_list(workers);
257 Ok(())
258}
259
260async fn command_worker_info(
261 gsettings: &GlobalSettings,

Callers 1

mainFunction · 0.85

Calls 6

get_client_sessionFunction · 0.85
get_worker_listFunction · 0.85
server_directoryMethod · 0.80
orMethod · 0.80
printerMethod · 0.80
print_worker_listMethod · 0.45

Tested by

no test coverage detected