fix sub submission for timestamping
This commit is contained in:
parent
29c59d93ea
commit
920be2bef6
|
@ -0,0 +1,10 @@
|
|||
CREATE OR REPLACE FUNCTION timestamp_item_on_insert() RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
IF NEW."subName" IS NOT NULL THEN
|
||||
RETURN NEW;
|
||||
END IF;
|
||||
-- insert indexItem pgboss.job with itemId
|
||||
INSERT INTO pgboss.job (name, data, startafter) VALUES ('timestampItem', jsonb_build_object('id', NEW.id), now() + interval '10 minutes');
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
Loading…
Reference in New Issue