diff options
author | Yorhel <git@yorhel.nl> | 2009-07-19 14:19:23 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-07-19 14:19:23 +0200 |
commit | f5e5f2ce1fd955793420fd62d663d54983e7facc (patch) | |
tree | 3f03d439810a1fed7073a939c029a7e4a14aacec /util/updates | |
parent | 678a78d71534441d5471ed24aa8b471ba08c6664 (diff) |
Notify Multi::Image via PostgreSQL for new screenshots
This finished the rewrite of Multi::Image and everything surrounding it.
Diffstat (limited to 'util/updates')
-rw-r--r-- | util/updates/update_2.6.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/updates/update_2.6.sql b/util/updates/update_2.6.sql index a2fa5b32..723e7c57 100644 --- a/util/updates/update_2.6.sql +++ b/util/updates/update_2.6.sql @@ -83,3 +83,17 @@ $$ LANGUAGE plpgsql; CREATE TRIGGER vn_rev_image_notify AFTER INSERT OR UPDATE ON vn_rev FOR EACH ROW EXECUTE PROCEDURE vn_rev_image_notify(); + +-- Send a notify when a screenshot needs to be processed +CREATE OR REPLACE FUNCTION screenshot_process_notify() RETURNS trigger AS $$ +BEGIN + IF NEW.processed = FALSE THEN + NOTIFY screenshot; + END IF; + RETURN NULL; +END; +$$ LANGUAGE plpgsql; + +CREATE TRIGGER screenshot_process_notify AFTER INSERT OR UPDATE ON screenshots FOR EACH ROW EXECUTE PROCEDURE screenshot_process_notify(); + + |