| 1 | package TaskPipe::UserAgentManager::Settings; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | with 'MooseX::ConfigCascade'; | |
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | TaskPipe::UserAgentManager::Settings - settings for TaskPipe::UserAgentManger | ||
| 9 | |||
| 10 | =head1 DESCRIPTION | ||
| 11 | |||
| 12 | Settings for L<TaskPipe::UserAgentManager> | ||
| 13 | |||
| 14 | =head1 METHODS | ||
| 15 | |||
| 16 | =over | ||
| 17 | |||
| 18 | =item max_retries | ||
| 19 | |||
| 20 | The maximum number of times to retry if a request fails | ||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | 1 | has max_retries => (is => 'ro', isa=> 'Int', default => 3); | |
| 25 | |||
| 26 | |||
| 27 | =item delay_base | ||
| 28 | |||
| 29 | The minimum number of seconds to delay between requests for a particular thread | ||
| 30 | |||
| 31 | =cut | ||
| 32 | |||
| 33 | 1 | has delay_base => (is => 'ro', isa => 'Int', default => 4); | |
| 34 | |||
| 35 | |||
| 36 | =item delay_max_rand | ||
| 37 | |||
| 38 | Randomise the number of seconds to wait between requests. Specify C<delay_max_rand> to add a random number of seconds to add to C<delay_base> between 0 and C<delay_max_rand> | ||
| 39 | |||
| 40 | =back | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 1 | has delay_max_rand => (is => 'ro', isa => 'Int', default => 8); | |
| 45 | |||
| 46 | =head1 AUTHOR | ||
| 47 | |||
| 48 | Tom Gracey <tomgracey@gmail.com> | ||
| 49 | |||
| 50 | =head1 COPYRIGHT AND LICENSE | ||
| 51 | |||
| 52 | Copyright (c) Tom Gracey 2018 | ||
| 53 | |||
| 54 | TaskPipe is free software, licensed under | ||
| 55 | |||
| 56 | The GNU Public License Version 3 | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | 1 | __PACKAGE__->meta->make_immutable; | |
| 61 | 1 | 1; | |