loops: cargo fmt --all (unblock CI)
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 26s
ci / rust (push) Failing after 56s
ci / e2e (push) Has been skipped
ci / publish (push) Has been skipped

This commit is contained in:
Omar Sobh
2026-07-08 05:45:06 -07:00
parent 16fcf8ef96
commit c063d4bbdd
+7 -17
View File
@@ -235,11 +235,7 @@ pub struct AgentSlot {
pub role_slot: Option<String>,
}
pub async fn set_agents(
pool: &PgPool,
loop_id: Uuid,
slots: &[AgentSlot],
) -> Result<(), DbError> {
pub async fn set_agents(pool: &PgPool, loop_id: Uuid, slots: &[AgentSlot]) -> Result<(), DbError> {
let mut tx = pool.begin().await?;
sqlx::query!("DELETE FROM loop_agents WHERE loop_id = $1", loop_id)
.execute(&mut *tx)
@@ -297,12 +293,9 @@ pub async fn set_teams(pool: &PgPool, loop_id: Uuid, ids: &[Uuid]) -> Result<(),
}
pub async fn teams(pool: &PgPool, loop_id: Uuid) -> Result<Vec<Uuid>, DbError> {
let rows = sqlx::query!(
"SELECT team_id FROM loop_teams WHERE loop_id = $1",
loop_id,
)
.fetch_all(pool)
.await?;
let rows = sqlx::query!("SELECT team_id FROM loop_teams WHERE loop_id = $1", loop_id,)
.fetch_all(pool)
.await?;
Ok(rows.into_iter().map(|r| r.team_id).collect())
}
@@ -326,12 +319,9 @@ pub async fn set_orgs(pool: &PgPool, loop_id: Uuid, ids: &[Uuid]) -> Result<(),
}
pub async fn orgs(pool: &PgPool, loop_id: Uuid) -> Result<Vec<Uuid>, DbError> {
let rows = sqlx::query!(
"SELECT org_id FROM loop_orgs WHERE loop_id = $1",
loop_id,
)
.fetch_all(pool)
.await?;
let rows = sqlx::query!("SELECT org_id FROM loop_orgs WHERE loop_id = $1", loop_id,)
.fetch_all(pool)
.await?;
Ok(rows.into_iter().map(|r| r.org_id).collect())
}