hydra-notify: Fix processing notifications
This commit is contained in:
@@ -96,8 +96,8 @@ my $sel = IO::Select->new($fd);
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
$sel->can_read;
|
$sel->can_read;
|
||||||
my $notify = $dbh->func("pg_notifies");
|
|
||||||
next if !$notify;
|
while (my $notify = $dbh->func("pg_notifies")) {
|
||||||
|
|
||||||
my ($channelName, $pid, $payload) = @$notify;
|
my ($channelName, $pid, $payload) = @$notify;
|
||||||
#print STDERR "got '$channelName' from $pid: $payload\n";
|
#print STDERR "got '$channelName' from $pid: $payload\n";
|
||||||
@@ -119,4 +119,5 @@ while (1) {
|
|||||||
if ($@) {
|
if ($@) {
|
||||||
print STDERR "error processing message '$payload' on channel '$channelName': $@\n";
|
print STDERR "error processing message '$payload' on channel '$channelName': $@\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user