MCPcopy Create free account
hub / github.com/hashintel/hash / create_temporal_client

Function create_temporal_client

apps/hash-graph/src/subcommand/server.rs:233–247  ·  view source on GitHub ↗
(
    config: &TemporalConfig,
)

Source from the content-addressed store, hash-verified

231}
232
233async fn create_temporal_client(
234 config: &TemporalConfig,
235) -> Result<Option<TemporalClient>, Report<GraphError>> {
236 if let Some(host) = &config.address.temporal_host {
237 TemporalClientConfig::new(
238 Url::from_str(&format!("{host}:{}", config.address.temporal_port))
239 .change_context(GraphError)?,
240 )
241 .await
242 .change_context(GraphError)
243 .map(Some)
244 } else {
245 Ok(None)
246 }
247}
248
249fn start_rest_server(router: axum::Router, address: HttpAddress, lifecycle: &ServerLifecycle) {
250 let shutdown = lifecycle.shutdown.clone();

Callers 1

start_serverFunction · 0.85

Calls 3

OkInterface · 0.85
mapMethod · 0.45
change_contextMethod · 0.45

Tested by

no test coverage detected