- New caching_custom_backfill_jobs and caching_custom_backfill_batches tables - Admin API (POST create/cancel, GET list) at admin/api/custom_backfill.php - Admin UI form with preset buttons and job status table on Backfill page - Caching daemon module (custom_backfill.c) processes jobs independently - pg_inbox functions for job/batch claim, progress update, and cancel - Three batch modes: author-batched, id-batched, time-window scan - Fixed done_batches overcount on job completion - Admin config now environment-variable driven (C_RELAY_DB_*) - admin/serve.sh supports separate instances for different databases - make_and_restart_relay.sh only kills relay on target port, not all relays
37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* C-Relay-PG Admin — Database connection configuration.
|
|
*
|
|
* This file is NOT web-accessible (denied by nginx location block).
|
|
* It contains the PostgreSQL connection string used by all admin pages.
|
|
*
|
|
* All values can be overridden via environment variables:
|
|
* C_RELAY_DB_HOST (default: localhost)
|
|
* C_RELAY_DB_PORT (default: 5432)
|
|
* C_RELAY_DB_NAME (default: crelay_prod)
|
|
* C_RELAY_DB_USER (default: crelay)
|
|
* C_RELAY_DB_PASSWORD (default: crelay)
|
|
*
|
|
* This allows running multiple admin PHP servers for different relays
|
|
* without editing this file:
|
|
* C_RELAY_DB_NAME=crelay php -S 127.0.0.1:8089 -t /path/to/admin
|
|
*/
|
|
|
|
// PostgreSQL connection parameters.
|
|
// These should match the --db-* flags passed to the c-relay-pg binary
|
|
// or the connection string passed to caching_relay -p "...".
|
|
return [
|
|
'db_host' => getenv('C_RELAY_DB_HOST') ?: 'localhost',
|
|
'db_port' => getenv('C_RELAY_DB_PORT') ?: '5432',
|
|
'db_name' => getenv('C_RELAY_DB_NAME') ?: 'crelay_prod',
|
|
'db_user' => getenv('C_RELAY_DB_USER') ?: 'crelay',
|
|
'db_password' => getenv('C_RELAY_DB_PASSWORD') ?: 'crelay',
|
|
|
|
// Page sizes for paginated tables.
|
|
'follows_per_page' => 50,
|
|
'relays_per_page' => 50,
|
|
|
|
// Auto-refresh interval for dashboard polling (milliseconds).
|
|
'refresh_ms' => 10000,
|
|
];
|