fix: only firing update status when image is not 'not-started'
This commit is contained in:
@ -111,7 +111,9 @@ $$ LANGUAGE plpgsql;
|
|||||||
CREATE OR REPLACE FUNCTION notify_new_processing_image_status()
|
CREATE OR REPLACE FUNCTION notify_new_processing_image_status()
|
||||||
RETURNS TRIGGER AS $$
|
RETURNS TRIGGER AS $$
|
||||||
BEGIN
|
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;
|
RETURN NEW;
|
||||||
END
|
END
|
||||||
$$ LANGUAGE plpgsql;
|
$$ LANGUAGE plpgsql;
|
||||||
|
Reference in New Issue
Block a user