3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU Affero General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Affero General Public License for more details.
13 * You should have received a copy of the GNU Affero General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 if (!defined('STATUSNET')) {
22 * Renew an expiring feedsub
24 * @author Stephen Paul Weber <singpolyma@singpolyma.net>
26 class PushRenewQueueHandler extends QueueHandler
33 function handle($data)
35 $feedsub_id = $data['feedsub_id'];
36 $feedsub = FeedSub::getKV('id', $feedsub_id);
37 if ($feedsub instanceof FeedSub) {
39 common_log(LOG_INFO, "Renewing feed subscription\n\tExp.: {$feedsub->sub_end}\n\tFeed: {$feedsub->uri}\n\tHub: {$feedsub->huburi}");
41 } catch(Exception $e) {
42 common_log(LOG_ERR, "Exception during PuSH renew processing for $feedsub->uri: " . $e->getMessage());
45 common_log(LOG_ERR, "Discarding renew for unknown feed subscription id $feedsub_id");