MCPcopy Create free account
hub / github.com/base/base / exec

Method exec

crates/batcher/cli/src/cli.rs:430–444  ·  view source on GitHub ↗

Execute the batcher until `cancellation` is cancelled.

(
        self,
        metrics_enabled: bool,
        cancellation: CancellationToken,
    )

Source from the content-addressed store, hash-verified

428
429 /// Execute the batcher until `cancellation` is cancelled.
430 pub async fn exec(
431 self,
432 metrics_enabled: bool,
433 cancellation: CancellationToken,
434 ) -> eyre::Result<()> {
435 let config = self.into_config(metrics_enabled)?;
436 let rt = TokioRuntime::with_token(cancellation.clone());
437
438 let setup = BatcherService::new(config).setup(rt);
439 let ready = tokio::select! {
440 ready = setup => ready?,
441 () = cancellation.cancelled() => return Ok(()),
442 };
443 ready.run().await
444 }
445}
446
447#[cfg(test)]

Callers 3

unwind_toMethod · 0.45
schema_dumpMethod · 0.45
runMethod · 0.45

Calls 5

into_configMethod · 0.80
newFunction · 0.50
cloneMethod · 0.45
setupMethod · 0.45
runMethod · 0.45

Tested by 1

schema_dumpMethod · 0.36