AnyEvent-PgRecvlogical
view release on metacpan or search on metacpan
1.04 2024-07-15 14:32:57-04:00 America/New_York
- remote time-watcher loop and rely only on io watcher
- improve test suite performance
1.03 2024-06-01 12:10:02-04:00 America/New_York
- throttle read loop when consumer has requested a pause
1.02 2021-01-06 14:19:30-05:00 America/New_York
- optimize heartbeat under EV
- ensure connection errors are thrown
1.01 2018-05-13 08:07:41-04:00 America/New_York
- fix dependencies to move Dist::Zilla::App::Command::cover to develop phase
1.0 2018-05-12 09:49:29-04:00 America/New_York
- add pause/unpause methods to provide so flow control to end users
0.004 2018-01-28 18:49:54-05:00 America/New_York
- explicit dependency on Promises 0.99; <= 0.94 won't work
lib/AnyEvent/PgRecvlogical.pm view on Meta::CPAN
Time, in seconds, to wait before reconnecting.
=item C<reconnect_limit>
=over
=item L<Int|Types::Standard/Int>, Default: C<1>
=back
Number of times to attempt reconnecting. If this limit is exceded, an exception will be thrown.
=item C<heartbeat>
=over
=item L<Int|Types::Standard/Int>, Default: C<10>
=back
Interval, in seconds, to report our progress to the PostgreSQL server.
lib/AnyEvent/PgRecvlogical.pm view on Meta::CPAN
my ($n, $msg);
my $ok = try {
$n = $self->dbh->pg_getcopydata_async($msg);
1;
} catch {
# uncoverable statement count:2
AE::postpone { $self->_handle_disconnect };
0;
};
# exception thrown, going to reconnect
return unless $ok; # uncoverable branch true
# nothing waiting
# watcher will re-enter until $n == 0
return if $n == 0;
if ($n == -1) {
AE::postpone { $self->_handle_disconnect };
return;
}
( run in 0.448 second using v1.01-cache-2.11-cpan-496ff517765 )