diff options
author | Dave Arter <davea@mysociety.org> | 2018-01-24 14:10:08 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2018-01-29 11:45:42 +0000 |
commit | 7b9a1fc9bf336884bad4d26c799b5233839b8617 (patch) | |
tree | d99f633c52e5d92fdacae8d1e09114c34b6c1e16 /perllib/FixMyStreet/SendReport.pm | |
parent | 945a88a668782ebb18d543cdd3b4eb75f83566c0 (diff) |
Never skip sending reports with --debug flag
It’s a little annoying to have to fiddle with the database between runs
of send-reports when debugging a stuck/failing report or working on a
new Open311 integration. This commit disables skipping of reports when
the --debug flag is used.
Diffstat (limited to 'perllib/FixMyStreet/SendReport.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/SendReport.pm b/perllib/FixMyStreet/SendReport.pm index 40ec4caf2..2739e3043 100644 --- a/perllib/FixMyStreet/SendReport.pm +++ b/perllib/FixMyStreet/SendReport.pm @@ -19,10 +19,12 @@ has 'unconfirmed_notes' => ( 'is' => 'rw', isa => HashRef, default => sub { {} } sub should_skip { - my $self = shift; - my $row = shift; + 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; |