diff options
author | Yorhel <git@yorhel.nl> | 2009-07-23 16:22:47 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-07-23 16:22:47 +0200 |
commit | 91b95b0bbf17a5756e5a7da4649f82f5a9184975 (patch) | |
tree | 03c5d8b88eb150c0043f374c9429b7fce68179a0 /lib/Multi/RG.pm | |
parent | 2ca3c8ed395490090e134883a3a364336fd62d77 (diff) |
Implemented relgraph notify from PgSQL trigger
This finishes the new relation graph generator, as it'll now regenerate
graphs as soon as is needed.
This obsletes the VNDB::Util::Misc::vnCacheUpdate() function, this
functionality is provided by triggers within PostgreSQL.
The update_vncache(0) procedure is now significantly slower due to the
trigger on the vn table. It'd be a good idea to rewrite this procedure
by using triggers and conditional updates, to drastically lower the number
of rows that need to be updated.
Diffstat (limited to 'lib/Multi/RG.pm')
-rw-r--r-- | lib/Multi/RG.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm index 303b2e54..65587e93 100644 --- a/lib/Multi/RG.pm +++ b/lib/Multi/RG.pm @@ -38,12 +38,14 @@ sub _start { $_[KERNEL]->alias_set('rg'); $_[KERNEL]->sig(CHLD => 'proc_child'); $_[KERNEL]->sig(shutdown => 'shutdown'); + $_[KERNEL]->post(pg => listen => relgraph => 'check_rg'); $_[KERNEL]->yield('check_rg'); } sub shutdown { $_[KERNEL]->delay('check_rg'); + $_[KERNEL]->post(pg => unlisten => 'relgraph'); } |