« blib/lib/Paws/Credential/InstanceProfile.pm
↑ Summary
blib/lib/Paws/Credential/ECSContainerProfile.pm »
| 1 | package Paws::Net::RetryCallerRole; | ||||||||||
| 2 | 23 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 23 | ▶ | use Time::HiRes 'sleep'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 23 | ▶ | use Paws::API::Retry; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 372 | ▶ | sub do_call { | ||||||||
|
Subroutine
do_call: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||
| 7 | 372 | my ($self, $service, $call_object) = @_; | |||||||||
| 8 | |||||||||||
| 9 | my $tracker = Paws::API::Retry->new( | ||||||||||
| 10 | 372 | %{ $service->retry }, | |||||||||
| 11 | max_tries => $service->max_attempts, | ||||||||||
| 12 | retry_rules => $service->retriables, | ||||||||||
| 13 | ); | ||||||||||
| 14 | |||||||||||
| 15 | 372 | ▶ | do { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 396 | $tracker->one_more_try; | |||||||||
| 17 | |||||||||||
| 18 | 396 | my $response = $self->send_request($service, $call_object); | |||||||||
| 19 | 253 | my $result = $self->caller_to_response($service, $call_object, $response); | |||||||||
| 20 | 253 | $tracker->operation_result($result); | |||||||||
| 21 | |||||||||||
| 22 | 253 | ▶ | sleep $tracker->sleep_time if($tracker->should_retry); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | } while ($tracker->should_retry); | ||||||||||
| 24 | |||||||||||
| 25 | 229 | ▶ | if ($tracker->result_is_exception){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 40 | $tracker->operation_result->throw; | |||||||||
| 27 | } else { | ||||||||||
| 28 | 189 | return $tracker->operation_result; | |||||||||
| 29 | } | ||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 23 | requires 'send_request'; | |||||||||
| 33 | 23 | 1; | |||||||||