swarm-controller: split main.rs into jobq, routes and startup modules
no behaviour change: a pure move of items and tests into new modules, plus visibility edits (pub(crate)) and path updates in sibling modules that named crate-root items. same routes, same OpenAPI, 561 tests before and after. why: #5470, new features stop landing in one 6.4k-line file by default. files outside swarm-controller/src: docs/agent-lifecycle/agent-roster.md, swarm-ui JobsPage.tsx and AgentsPage.tsx, nix/host-modules/swarm-controller.nix and swarm-grafana.nix hold comments that named main.rs for items that moved.
This commit is contained in:
parent
f0a6d6c042
commit
738dd1c95b
1 changed files with 6854 additions and 6680 deletions
|
|
@ -33,8 +33,8 @@ use swarm_controller_api::schedules::{
|
|||
use swarm_queue_client::agent_schedules::{self, AgentSchedules, Schedule};
|
||||
|
||||
use crate::agent_renewal::unix_now;
|
||||
use crate::routes::{AppState, error_problem};
|
||||
use crate::wanted::WantedWriter;
|
||||
use crate::{AppState, error_problem};
|
||||
|
||||
/// The bucket holding every schedule definition. Agents hold no grant on it.
|
||||
pub const DEFINITIONS_BUCKET: &str = "schedule-definitions";
|
||||
|
|
@ -384,7 +384,7 @@ fn problem(failure: Failure) -> ProblemDetails {
|
|||
}
|
||||
Failure::Queue(e) => {
|
||||
tracing::warn!(error = %format!("{e:#}"), "schedules: queue failure");
|
||||
error_problem(crate::wanted_error_status(&e), &format!("{e:#}"))
|
||||
error_problem(crate::routes::wanted_error_status(&e), &format!("{e:#}"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue