Files
AI-Horde/sql_statements/README.md
ceruleandeep aaba202a06 Fix example Docker Compose environment
Pull Horde's custom postgres image

Build aihorde Docker image in two stages to minimise rebuild time

Establish minimal necessary configuration to bring up a working composition

Fix pre-commit config so black and ruff hooks run

Catch and report exceptions in is_redis_up()

Add missing final EOL markers to some files (per black)

Update documentation
2024-09-27 15:28:18 +02:00

1.3 KiB

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.