diff options
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Barnet.pm | 21 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 24 |
2 files changed, 0 insertions, 45 deletions
diff --git a/perllib/FixMyStreet/SendReport/Barnet.pm b/perllib/FixMyStreet/SendReport/Barnet.pm index 05ca20809..68bc8d6dc 100644 --- a/perllib/FixMyStreet/SendReport/Barnet.pm +++ b/perllib/FixMyStreet/SendReport/Barnet.pm @@ -10,31 +10,10 @@ use Utils; use mySociety::Config; use mySociety::Web qw(ent); -# maximum number of webservice attempts to send before not trying any more (XXX may be better in config?) -use constant SEND_FAIL_RETRIES_CUTOFF => 3; - # specific council numbers use constant COUNCIL_ID_BARNET => 2489; use constant MAX_LINE_LENGTH => 132; -sub should_skip { - my $self = shift; - my $row = shift; - - my $council_name = 'Barnet'; - my $err_msg = ""; - - if ($row->send_fail_count >= SEND_FAIL_RETRIES_CUTOFF) { - $council_name &&= " to $council_name"; - $err_msg = "skipped: problem id=" . $row->id . " send$council_name has failed " - . $row->send_fail_count . " times, cutoff is " . SEND_FAIL_RETRIES_CUTOFF; - - $self->skipped( $err_msg ); - - return 1; - } -} - sub construct_message { my %h = @_; my $message = <<EOF; diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 1ad7f5b05..9cdb7c4b4 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -13,17 +13,6 @@ use Readonly; Readonly::Scalar my $COUNCIL_ID_OXFORDSHIRE => 2237; -sub should_skip { - my $self = shift; - my $row = shift; - - if ( $row->send_fail_count > 0 ) { - if ( bromley_retry_timeout($row) ) { - return 1; - } - } -} - sub send { my $self = shift; my ( $row, $h ) = @_; @@ -164,17 +153,4 @@ sub send { return $result; } -sub bromley_retry_timeout { - my $row = shift; - - my $tz = DateTime::TimeZone->new( name => 'local' ); - my $now = DateTime->now( time_zone => $tz ); - my $diff = $now - $row->send_fail_timestamp; - if ( $diff->in_units( 'minutes' ) < 30 ) { - return 1; - } - - return 0; -} - 1; |