mirror of
https://github.com/Haidra-Org/AI-Horde.git
synced 2026-11-06 05:17:31 +00:00
Legacy text requests keep reaching the slow workers that complete them, and each assignment the gate would refuse is recorded so the cost of enforcing it can be read from production. - TextWorker.can_generate_with_eligibility_inputs refuses lease_speed only for a chat request. - text_wp_speed_gate_clause passes every legacy request, so the pop query and the eligibility check agree for both request families. - Status, worker availability and the wait estimate read the same eligibility check, so slow workers count toward legacy requests. - worker_may_be_speed_gated reads only the chat declaration, so horde.pop.lease_capacity_limited counts chat pops only. - A legacy job assigned over the worker's lease capacity stores TextProcessingGeneration.over_capacity_at_assignment, increments horde.text.gate_shadow.assignments and logs its ids. The marker is written by the commit that creates the row. - horde.text.gate_shadow.outcomes counts such a job as completed, faulted or aborted, and horde.text.gate_shadow.service_seconds records a completed job's pop to submit time. - The shadow records carry horde.worker_trusted and a bounded horde.size_bucket from TEXT_LENGTH_BUCKETS in horde/metrics.py. - ProcessingGeneration.fault_and_restart returns whether the call faulted the generation, so a repeated fault submit is counted once. - sql_statements/5.1.15.txt adds the processing_gens column. - ADR 0041 records the decision with its evidence. ADRs 0038 and 0040, docs/reference/chat_requests.md and the decisions index follow it.
AI-Horde Database Information
- postgresql >=15
- pg_cron
pg_cron config
Warning
: All
.sqlfiles found in a directory deeper thansql_statements/will be dynamically run, not only the ones specifically identified in this document. Only place.sqlfiles you intend to run in these directories. This does not apply to thesql_statementslevel (i.e.,sql_statements/4.35.1.sqlis not automatically run, butsql_statements/cron/your_new_file.sqlwill 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_procedurescompile_*gen_stats_*.sql- These files defined stored procedures which populated the
compiled_*tables and generally represent minute/hour/day/total statistics about generations.
- These files defined stored procedures which populated the
cron_jobs/- Schedules any stats compile jobs via
schedule_cron_job.
- Schedules any stats compile jobs via