]> git.openstreetmap.org Git - dns.git/commitdiff
Update mkgeo to use LWP::UserAgent::Determined + set fair timeout
authorGrant Slater <git@firefishy.com>
Wed, 30 Oct 2013 20:53:50 +0000 (20:53 +0000)
committerGrant Slater <git@firefishy.com>
Wed, 30 Oct 2013 20:53:50 +0000 (20:53 +0000)
bin/mkgeo

index 4dceb1ded1fc4d64c9371613da067f7d640d77cb..a732711af2b36173d1820e4c3f50db35a8108675 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -6,7 +6,7 @@ use warnings;
 use IO::File;
 use Math::Trig qw(deg2rad pip2 great_circle_distance);
 use JSON::XS;
 use IO::File;
 use Math::Trig qw(deg2rad pip2 great_circle_distance);
 use JSON::XS;
-use LWP::UserAgent;
+use LWP::UserAgent::Determined;
 use YAML;
 
 my $originfile = shift @ARGV;
 use YAML;
 
 my $originfile = shift @ARGV;
@@ -75,7 +75,8 @@ foreach my $server (@servers)
 # If pingdom support is enabled then check which servers are up
 if ($ENV{PINGDOM_USERNAME} && $ENV{PINGDOM_PASSWORD})
 {
 # If pingdom support is enabled then check which servers are up
 if ($ENV{PINGDOM_USERNAME} && $ENV{PINGDOM_PASSWORD})
 {
-    my $ua = LWP::UserAgent->new;
+    my $ua = LWP::UserAgent::Determined->new;
+    $ua->timeout(15);
 
     $ua->default_header("App-Key", "2cohi62u5haxvqmypk3ljqqrze1jufrh");
     $ua->credentials("api.pingdom.com:443", "Pingdom API", $ENV{PINGDOM_USERNAME}, $ENV{PINGDOM_PASSWORD});
 
     $ua->default_header("App-Key", "2cohi62u5haxvqmypk3ljqqrze1jufrh");
     $ua->credentials("api.pingdom.com:443", "Pingdom API", $ENV{PINGDOM_USERNAME}, $ENV{PINGDOM_PASSWORD});