feat(ops): add job center for cross-source job operations

Provide a unified ops console for inspecting, retrying and cancelling
jobs across generation, template/kol assist, knowledge parse, desktop
publish/task, compliance review and monitoring collect sources. Wires
RabbitMQ for retry republish and consolidates the desktop_publish_jobs
columns into the base migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 12:56:39 +08:00
parent ab62d666b4
commit 7b4d7ccf68
13 changed files with 3043 additions and 12 deletions
@@ -202,12 +202,13 @@ ALTER TABLE article_versions
ON DELETE SET NULL;
ALTER TABLE desktop_publish_jobs
ADD COLUMN IF NOT EXISTS article_id BIGINT REFERENCES articles(id),
ADD COLUMN IF NOT EXISTS article_version_id BIGINT REFERENCES article_versions(id),
ADD COLUMN IF NOT EXISTS status VARCHAR(32) NOT NULL DEFAULT 'queued',
ADD COLUMN IF NOT EXISTS compliance_blocked_record_id BIGINT REFERENCES compliance_check_records(id) ON DELETE SET NULL,
ADD COLUMN IF NOT EXISTS compliance_blocked_at TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS compliance_blocked_reason TEXT;
DROP CONSTRAINT IF EXISTS desktop_publish_jobs_compliance_blocked_record_id_fkey;
ALTER TABLE desktop_publish_jobs
ADD CONSTRAINT desktop_publish_jobs_compliance_blocked_record_id_fkey
FOREIGN KEY (compliance_blocked_record_id)
REFERENCES compliance_check_records(id)
ON DELETE SET NULL;
CREATE INDEX IF NOT EXISTS idx_desktop_publish_jobs_status_scheduled
ON desktop_publish_jobs (status, scheduled_at, created_at)