]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Catch exceptions during SubMirror mirror attempt; log & skip that one if found.
authorBrion Vibber <brion@pobox.com>
Fri, 10 Sep 2010 18:50:19 +0000 (11:50 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 10 Sep 2010 18:50:19 +0000 (11:50 -0700)
Should avoid things like RequireValidatedEmailPlugin causing infinite retry loops if the mirror-er isn't validated yet.

plugins/SubMirror/lib/mirrorqueuehandler.php

index 92b36b5ebfdcd60c4241cf465304bcc6702a189d..c1a6f65e3817572e9c503ed2a204b11cf5f5caf1 100644 (file)
@@ -37,7 +37,13 @@ class MirrorQueueHandler extends QueueHandler
         $mirror->subscribed = $notice->profile_id;
         if ($mirror->find()) {
             while ($mirror->fetch()) {
-                $mirror->mirrorNotice($notice);
+                try {
+                    $mirror->mirrorNotice($notice);
+                } catch (Exception $e) {
+                    common_log(LOG_ERR, "Exception trying to mirror notice $notice->id " .
+                                        "for subscriber $mirror->subscriber ($mirror->style): " .
+                                        $e->getMessage());
+                }
             }
         }
         return true;