From c38abf3b8de60ec1012f0fdf6e65658b97b3a13b Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 21 Apr 2017 17:48:14 +0200 Subject: Renew subscriptions that got no response. May happen if there were network issues or the server phinde is running on was shut down directly after the subscription request was sent. Resolves: https://github.com/cweiske/phinde/issues/28 --- bin/subscribe.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/subscribe.php b/bin/subscribe.php index 411fa86..7d05f79 100755 --- a/bin/subscribe.php +++ b/bin/subscribe.php @@ -22,17 +22,18 @@ try { $cc->displayError($e->getMessage()); } +$subDb = new Subscriptions(); + $url = $res->args['url']; $url = Helper::addSchema($url); $urlObj = new \Net_URL2($url); $url = $urlObj->getNormalizedURL(); if (!Helper::isUrlAllowed($url)) { - Log::error("Domain is not allowed; not crawling"); + Log::error("Domain is not allowed; not subscribing"); + $subDb->remove($url); exit(2); } -$subDb = new Subscriptions(); - list($topic, $hub) = $subDb->detectHub($url); if ($hub === null) { Log::error('No hub URL found for topic'); -- cgit v1.2.3