fmt: apply cargo fmt to topology_worker.rs
This commit is contained in:
@@ -191,21 +191,20 @@ async fn run_job(
|
||||
// doesn't bind /workspace/repo, so coding agents would spend their
|
||||
// turns narrating without touching files — a much worse failure
|
||||
// mode than a red run with a clear error.
|
||||
let per_topic_url = match try_team_gateway_url(pool, id, WorkspaceId::from(job.workspace_id))
|
||||
.await
|
||||
{
|
||||
Ok(url) => url,
|
||||
Err(e) => {
|
||||
eprintln!("topology_worker: team gateway resolution failed for run {id}: {e}");
|
||||
let _ = cm_db::repo::topology_runs::fail(
|
||||
pool,
|
||||
id,
|
||||
&format!("team container unavailable — {e}"),
|
||||
)
|
||||
.await;
|
||||
return;
|
||||
}
|
||||
};
|
||||
let per_topic_url =
|
||||
match try_team_gateway_url(pool, id, WorkspaceId::from(job.workspace_id)).await {
|
||||
Ok(url) => url,
|
||||
Err(e) => {
|
||||
eprintln!("topology_worker: team gateway resolution failed for run {id}: {e}");
|
||||
let _ = cm_db::repo::topology_runs::fail(
|
||||
pool,
|
||||
id,
|
||||
&format!("team container unavailable — {e}"),
|
||||
)
|
||||
.await;
|
||||
return;
|
||||
}
|
||||
};
|
||||
let per_topic_url = if per_topic_url.is_some() {
|
||||
per_topic_url
|
||||
} else {
|
||||
@@ -697,18 +696,21 @@ async fn try_team_gateway_url(
|
||||
}
|
||||
Err(e) => return Err(format!("source_research_context({loop_id}): {e}")),
|
||||
};
|
||||
let source_topic =
|
||||
match cm_db::repo::research_topics::get(pool, source_topic_id, workspace_id.as_uuid())
|
||||
.await
|
||||
{
|
||||
Ok(Some(t)) => t,
|
||||
Ok(None) => {
|
||||
return Err(format!(
|
||||
"source research topic {source_topic_id} not found in workspace"
|
||||
));
|
||||
}
|
||||
Err(e) => return Err(format!("research_topics::get({source_topic_id}): {e}")),
|
||||
};
|
||||
let source_topic = match cm_db::repo::research_topics::get(
|
||||
pool,
|
||||
source_topic_id,
|
||||
workspace_id.as_uuid(),
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(Some(t)) => t,
|
||||
Ok(None) => {
|
||||
return Err(format!(
|
||||
"source research topic {source_topic_id} not found in workspace"
|
||||
));
|
||||
}
|
||||
Err(e) => return Err(format!("research_topics::get({source_topic_id}): {e}")),
|
||||
};
|
||||
let Some(repo_path) = source_topic.repo_workspace_path.clone() else {
|
||||
return Err(format!(
|
||||
"source research topic {source_topic_id} has no repo_workspace_path; \
|
||||
|
||||
Reference in New Issue
Block a user