Error log, retry notice, a waiting counter that keeps counting
- generation_errors: every failed attempt (model, attempt, outcome, duration); admin Hibanapló page and GET /v1/admin/errors; kept 90 days - The waiting page counts from when the text was asked for (requested_at), not from the page load, so a reload no longer restarts it - It says when an attempt failed and is retried, and when a failed text's unit was given back; admins see the error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -8,7 +8,7 @@ use tokio::sync::watch;
|
||||
const INTERVAL: Duration = Duration::from_secs(3600);
|
||||
|
||||
/// (what, statement) pairs; each returns the number of deleted rows.
|
||||
const STATEMENTS: [(&str, &str); 6] = [
|
||||
const STATEMENTS: [(&str, &str); 7] = [
|
||||
("sessions", "DELETE FROM sessions WHERE expires_at < now()"),
|
||||
("auth_tokens", "DELETE FROM auth_tokens WHERE expires_at < now()"),
|
||||
// Sent e-mails contain links with tokens; keep them a week for support.
|
||||
@@ -26,6 +26,7 @@ const STATEMENTS: [(&str, &str); 6] = [
|
||||
OR (accepted_at IS NOT NULL AND accepted_by IS NULL)",
|
||||
),
|
||||
("prompt_previews", "DELETE FROM prompt_previews WHERE created_at < now() - interval '30 days'"),
|
||||
("generation_errors", "DELETE FROM generation_errors WHERE created_at < now() - interval '90 days'"),
|
||||
];
|
||||
|
||||
pub async fn run_once(db: &PgPool) -> Result<Vec<(&'static str, u64)>, sqlx::Error> {
|
||||
|
||||
Reference in New Issue
Block a user