diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-04-06 17:50:01 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-04-06 17:50:01 +0100 |
commit | b892ef1ce69ec4aaa1c3e961c08d00a75877575c (patch) | |
tree | 403d1fd9a8bb860db8dd5f4ce769a36fb2a866e1 /perllib/FixMyStreet/SendReport.pm | |
parent | 99043455d12b3d7952d21bff0538539a9601ebf0 (diff) |
Ignore sending failures within the database query.
This means the code can assume it should be trying to send a report.
Diffstat (limited to 'perllib/FixMyStreet/SendReport.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport.pm | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/perllib/FixMyStreet/SendReport.pm b/perllib/FixMyStreet/SendReport.pm index 0d8bea304..c08a7ddbe 100644 --- a/perllib/FixMyStreet/SendReport.pm +++ b/perllib/FixMyStreet/SendReport.pm @@ -18,21 +18,6 @@ has 'error' => ( is => 'rw', isa => Str, default => '' ); has 'unconfirmed_data' => ( 'is' => 'rw', isa => HashRef, default => sub { {} } ); -sub should_skip { - my $self = shift; - my $row = shift; - my $debug = shift; - - return 0 unless $row->send_fail_count; - return 0 if $debug; - - my $now = DateTime->now( time_zone => FixMyStreet->local_time_zone ); - my $diff = $now - $row->send_fail_timestamp; - - my $backoff = $row->send_fail_count > 1 ? 30 : 5; - return $diff->in_units( 'minutes' ) < $backoff; -} - sub get_senders { my $self = shift; |