aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-01-19 11:56:38 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-01-19 12:29:26 +0000
commitfa669c507539cddbc913e7cff7fe8758236bd6cd (patch)
tree0b09c49f47617a18810c46c608bd885a4ffae7f8 /perllib/Open311.pm
parent3322ed3a2c65ddf22d4a64eb777dd19134edaff4 (diff)
Open311 warn only after a couple of failures.
There are a couple of servers we currently talk to that error not that infrequently but work in the end.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 0b44575db..c1323acfa 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -83,10 +83,10 @@ sub send_service_request {
}
warn sprintf( "Failed to submit problem %s over Open311, response\n: %s\n%s", $problem->id, $response, $self->debug_details )
- unless $problem->send_fail_count;
+ if $problem->send_fail_count && $problem->send_fail_count == 2;
} else {
warn sprintf( "Failed to submit problem %s over Open311, details:\n%s", $problem->id, $self->error)
- unless $problem->send_fail_count;
+ if $problem->send_fail_count && $problem->send_fail_count == 2;
}
return 0;
}
@@ -259,10 +259,10 @@ sub post_service_request_update {
}
warn sprintf( "Failed to submit comment %s over Open311, response - %s\n%s\n", $comment->id, $response, $self->debug_details )
- unless $comment->send_fail_count;
+ if $comment->send_fail_count && $comment->send_fail_count == 2;
} else {
warn sprintf( "Failed to submit comment %s over Open311, details\n%s\n", $comment->id, $self->error)
- unless $comment->send_fail_count;
+ if $comment->send_fail_count && $comment->send_fail_count == 2;
}
return 0;
}