Files
tazlin 3703c4da8b feat(api): expose paused-worker review and worker suspicion history to moderators
- Record each worker suspicion in worker_suspicion_events from report_suspicion, keyed by worker UUID without foreign keys, so the history outlives suspicion resets, worker deletion and account wipes; the stored name is cut to the workers table's length (MAX_WORKER_NAME_CHARACTERS), since check_for_bad_actor reports an overlong name before it shortens it.
- Keep the history unless HORDE_WORKER_SUSPICION_RETENTION_DAYS is set, then delete rows past that window in a bounded step of apply_evidence_retention (RetentionPolicy.worker_suspicion), keeping the history of flagged or suspicious owners like every other step; the window is at most 36,500 days (MAX_WORKER_SUSPICION_RETENTION_DAYS), so the cutoff stays inside the date range.
- Disclose what the history records and its period in the privacy document, rendered from the same policy (RetentionPolicy.worker_suspicion_days).
- Add GET /api/v2/operations/moderation/worker_suspicion_events, filtered by worker or owner and paged by before_id; each row carries worker_id, user_id and suspicion_id, since worker names are not unique over time.
- Define the online window (WORKER_ONLINE_SECONDS) and the name limit (MAX_WORKER_NAME_CHARACTERS) once in worker.py, used by is_stale, check_for_bad_actor and set_name as well as the overview.
- Add the paused-worker list to the moderation overview, filtered by worker type, suspicion reason and online state, with a sort and paused_workers_total.
- Add InvalidWorkerID and InvalidSuspicionID return codes.
2026-10-01 18:10:05 -04:00
..
2023-03-06 23:55:27 +01:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2023-03-21 13:42:32 +01:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2023-05-03 18:48:45 +02:00
2024-08-10 15:45:14 +02:00
2023-05-08 02:34:08 +02:00
2023-05-09 00:36:12 +02:00
2023-05-20 22:57:18 +02:00
2024-08-10 15:45:14 +02:00
2023-08-31 17:12:00 +02:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2024-08-10 15:45:14 +02:00
2024-02-03 15:57:01 +01:00
2024-02-28 00:46:22 +01:00
2024-05-21 23:44:28 +02:00
2024-11-03 19:50:02 +01:00
2024-11-03 19:50:02 +01:00
2025-06-08 16:47:24 +02:00
2024-08-10 15:45:14 +02:00

AI-Horde Database Information

pg_cron config

Warning

: All .sql files found in a directory deeper than sql_statements/ will be dynamically run, not only the ones specifically identified in this document. Only place .sql files you intend to run in these directories. This does not apply to the sql_statements level (i.e., sql_statements/4.35.1.sql is not automatically run, but sql_statements/cron/your_new_file.sql will be.)

  • cron/
    • schedule_cron_job.sql
      • Creates a stored procedure which schedules a new pg_cron job to execute a specified stored procedure at intervals defined by a cron schedule string, if a job with the same command doesn't already exist.
      • e.g., CALL schedule_cron_job('0-59 * * * *', 'compile_imagegen_stats_totals');
  • stored_procedures
    • compile_*gen_stats_*.sql
      • These files defined stored procedures which populated the compiled_* tables and generally represent minute/hour/day/total statistics about generations.
    • cron_jobs/
      • Schedules any stats compile jobs via schedule_cron_job.