Amazon-SQS-Client
view release on metacpan or search on metacpan
bin/QueueDaemon.pl view on Meta::CPAN
=item 6. By default messages will only be deleted from the queue if your
handler returns a true value. If you want to delete messages which cannot be
decoded or when you handler returns a non-true value, set the
--delete-when or set 'delete' option in the [error] section of your .ini file.
=item 7. To exit the daemon when your handler returns a non-true value
set the --exit-when option to 'false' or in the [error] section of your .ini
file, set 'exit = false'.
=item 8. To exit the daemon if your handler throws an exception,
set the --exit-when option to 'error' or in the [error] section of your .ini
file, set 'exit = error'.
=back
The daemon can be started using the helper script C<aws-sqsd>.
=over 5
=item Starting
lib/Amazon/SQS/Client.pm view on Meta::CPAN
Carp::croak( Amazon::SQS::Exception->new( { Message => $e } ) );
}
}
return $response->content;
}
#
# Exponential sleep on failed request
# Retries - current retry
# throws Amazon::SQS::Exception if maximum number of retries has been reached
#
########################################################################
sub _pauseOnRetry {
########################################################################
my ( $self, $retries, $status, $error ) = @_;
if ( $retries <= $self->get_MaxErrorRetry ) {
my $delay = ( 4**$retries ) * 100_000;
usleep($delay);
}
lib/Amazon/SQS/Exception.pm view on Meta::CPAN
#
# Gets error message
#
sub getMessage {
return shift->{_message};
}
#
# Gets status code returned by the service if available. If status
# code is set to -1, it means that status code was unavailable at the
# time exception was thrown
#
sub getStatusCode {
return shift->{_statusCode};
}
#
# Gets XML returned by the service if available.
#
sub getXML {
return shift->{_xml};
( run in 0.427 second using v1.01-cache-2.11-cpan-496ff517765 )