Implement Trivy adapter, contain job panics, fail interrupted runs on startup
The Trivy scanner still had unimplemented stubs, which panicked the scan task in the deployed test instance and left the run in 'running' forever. JobRunner now runs handlers in their own task and marks a panic as a failed run; on startup runs left 'running' by a previous process are marked failed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@ -161,6 +161,10 @@ impl AppState {
|
||||
}
|
||||
|
||||
pub async fn bootstrap(&self) -> anyhow::Result<()> {
|
||||
let stale = self.jobs.recover().await?;
|
||||
if stale > 0 {
|
||||
tracing::warn!("marked {stale} interrupted job run(s) as failed");
|
||||
}
|
||||
if let Some((email, password)) = &self.cfg.bootstrap_admin {
|
||||
if self.users.bootstrap_admin(email, password).await? {
|
||||
tracing::info!("created bootstrap admin {email}");
|
||||
|
||||
Reference in New Issue
Block a user