TaskPipe/Tool/Command__OpenProxies_TestOpenProxies.pm untested

filter: Statementstmt 0.0% 0 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
execute_specific
2.0
BEGIN
2.0
CRAP 2.0
1 package TaskPipe::Tool::Command__OpenProxies_TestOpenProxies;
2  
3 use Moose;
4 extends 'TaskPipe::Tool::Command__OpenProxies';
5  
6 sub execute_specific{
7 my ($self) = @_;
8  
9 $self->proxy_manager->test_proxies;
10 }
11  
12 __PACKAGE__->meta->make_immutable;
13  
14 =head1 NAME
15  
16 TaskPipe::Tool::Command__OpenProxies_TestOpenProxies - command to test open proxies
17  
18 =head1 PURPOSE
19  
20 Test the proxies that were retrieved by C<fetch open proxies>.
21  
22 =head1 DESCRIPTION
23  
24 C<test open proxies> goes through the list of proxies which C<fetch open proxies> retrieved. C<fetch open proxies> should be run, or at least started in advance of running C<test open proxies>.
25  
26 C<test open proxies> proceeds through the table of IPs retrieved by C<fetch open proxies> starting with the proxy that was last tested the longest ago, or not tested at all. Proxies that test successfully are marked C<available> and will be used by C<TaskPipe::UserAgentManager_ProxyNet_Open>.
27  
28 Proxies that test unsuccessfully are marked for deletion, but not immediately deleted. This is to prevent retesting of proxies retrieved by C<fetch open proxies> which are known to be dud.
29  
30 After the time period specified in C<clean_dud_proxies_after>, dud proxies are deleted completely (and thus will be re-found and re-tested if they remain on any list which C<fetch open proxies> is gathering IPs from).
31  
32 C<test open proxies> can be run as a daemon process by including C<--iterate=repeat> and C<--shell=background>:
33  
34 taskpipe test open proxies --iterate=repeat --shell=background
35  
36 =head1 AUTHOR
37  
38 Tom Gracey <tomgracey@gmail.com>
39  
40 =head1 COPYRIGHT AND LICENSE
41  
42 Copyright (c) Tom Gracey 2018
43  
44 TaskPipe is free software, licensed under
45  
46 The GNU Public License Version 3
47  
48 =cut
49  
50 1;