aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Job/PushObject.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/Job/PushObject.php')
-rw-r--r--Digitigrade/Job/PushObject.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Digitigrade/Job/PushObject.php b/Digitigrade/Job/PushObject.php
index 0278eb5..1f3bcd9 100644
--- a/Digitigrade/Job/PushObject.php
+++ b/Digitigrade/Job/PushObject.php
@@ -29,8 +29,9 @@ class PushObject extends Job {
$log = Logger::getInstance();
$log->info("pushing object $object->uri to server $instance->domain");
+ $successful = false;
try {
- $instance->pushObject($object);
+ $successful = $instance->pushObject($object);
} catch (EndpointMissingException $e) {
$log->warning("can't push to $instance->domain because it has no push endpoint. giving up");
// and don't throw again here because we want it to look successful and not be retried
@@ -43,5 +44,8 @@ class PushObject extends Job {
$log->warning("can't push to $instance->domain because a policy rejected it. giving up");
// and don't throw again, pretty much same reasoning as above
}
+ if (!$successful) {
+ throw new \RuntimeException("failed to push to $instance->domain");
+ }
}
} \ No newline at end of file