fix: Face processor now saves status and total_faces to face.json

This commit is contained in:
Accusys
2026-09-26 23:06:11 +08:00
parent 8a736a4103
commit 357e585399
99 changed files with 13881 additions and 1065 deletions
@@ -0,0 +1,15 @@
-- Add vlm_description_localized column for bilingual VLM support
-- English description used for indexing/search
-- Localized description used for display
-- Scene VLM
ALTER TABLE scenes
ADD COLUMN IF NOT EXISTS vlm_description_localized TEXT;
-- Trace VLM
ALTER TABLE trace_profiles
ADD COLUMN IF NOT EXISTS vlm_description_localized TEXT;
-- Add comment
COMMENT ON COLUMN scenes.vlm_description_localized IS 'Localized VLM description for display (e.g., zh-TW)';
COMMENT ON COLUMN trace_profiles.vlm_description_localized IS 'Localized VLM description for display (e.g., zh-TW)';
@@ -170,6 +170,35 @@ CREATE TABLE IF NOT EXISTS public.monitor_jobs (
ALTER SEQUENCE public.monitor_jobs_id_seq OWNED BY public.monitor_jobs.id;
-- ============================================================
-- 6b. command_queue (register/unregister command queue)
-- ============================================================
CREATE SEQUENCE IF NOT EXISTS public.command_queue_id_seq AS integer START WITH 1;
CREATE TABLE IF NOT EXISTS public.command_queue (
id integer DEFAULT nextval('public.command_queue_id_seq') NOT NULL,
command_id character varying(36) NOT NULL DEFAULT replace(gen_random_uuid()::text, '-', ''),
job_type character varying(20) NOT NULL,
file_path character varying(512),
file_uuid character varying(32),
user_id bigint,
payload jsonb DEFAULT '{}'::jsonb,
status character varying(20) DEFAULT 'pending'::character varying,
priority integer DEFAULT 0,
error_count integer DEFAULT 0,
last_error text,
retry_count integer DEFAULT 0,
started_at timestamp with time zone,
completed_at timestamp with time zone,
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);
ALTER SEQUENCE public.command_queue_id_seq OWNED BY public.command_queue.id;
CREATE UNIQUE INDEX IF NOT EXISTS idx_command_queue_command_id ON public.command_queue(command_id);
CREATE INDEX IF NOT EXISTS idx_command_queue_status_created ON public.command_queue(status, created_at);
-- ============================================================
-- 7. processor_results
-- ============================================================