fix: only firing update status when image is not 'not-started'

This commit is contained in:
2025-08-30 20:32:05 +01:00
parent 84a0996be9
commit 95330c163b

View File

@ -111,7 +111,9 @@ $$ LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION notify_new_processing_image_status()
RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify('new_processing_image_status', NEW.id::text || NEW.status::text);
IF NEW.status <> 'not-started' THEN
PERFORM pg_notify('new_processing_image_status', NEW.id::text || NEW.status::text);
END IF;
RETURN NEW;
END
$$ LANGUAGE plpgsql;