X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCron%2Fcheck.pm;h=75247fbaf4213cd54eb566bfe2a20a09b4b5e69a;hb=f822e27a1e00594332ffa487a1c284234c5580a6;hp=39dd168b4964b6708d8923bc1462e00443ddd54b;hpb=06366964387677bd819ff9603a25d4399d9ad84d;p=freeside.git diff --git a/FS/FS/Cron/check.pm b/FS/FS/Cron/check.pm index 39dd168b4..75247fbaf 100644 --- a/FS/FS/Cron/check.pm +++ b/FS/FS/Cron/check.pm @@ -6,6 +6,9 @@ use vars qw( @ISA @EXPORT_OK $DEBUG $FS_RUN $error_msg ); use Exporter; use LWP::UserAgent; +use HTTP::Request; +use URI::Escape; +use Email::Send; use FS::Conf; use FS::Record qw(qsearch); use FS::cust_pay_pending; @@ -65,14 +68,14 @@ sub check_apache { my $req = new HTTP::Request GET => 'https://localhost/'; my $res = $ua->request($req); - return 1 if $res->is_success; + return 1 if $res->is_success || $res->status_line =~ /^403/; $error_msg = $res->status_line; return 0; } #and now for something entirely different... -my $num_consecutive_bop_failures = 10; +my $num_consecutive_bop_failures = 60; sub check_bop_failures { return 1 if grep { $_->statustext eq 'captured' }