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