diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-13 18:03:41 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-13 18:03:41 +0000 |
commit | 536b29fa6ca68c26012785df5ad6807ce96acc40 (patch) | |
tree | 974f87047b331c33844e70e5f2b23b5601de8e86 /utils | |
parent | 1208d15943738e80e267609aa88f16ec722aaba9 (diff) |
Correcting issue with process_queue not receiving notifies
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1977 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'utils')
-rw-r--r-- | utils/process_queue/process_queue.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/process_queue/process_queue.pl b/utils/process_queue/process_queue.pl index 7c56869a..28401eb6 100644 --- a/utils/process_queue/process_queue.pl +++ b/utils/process_queue/process_queue.pl @@ -17,10 +17,9 @@ my $dbh = db_init(); my $sth; -$dbh->do("LISTEN job_entered"); while (1) { # loop infinitely if ( $dbh->func('pg_notifies') ) { - &on_notify; + on_notify(); } sleep $cycle_delay; } @@ -85,5 +84,7 @@ sub db_init { if (!$cycle_delay){ die "No Polling Frequency Set Up!"; } + $dbh->do("LISTEN job_entered"); + $dbh->commit; return $dbh; } |