3 if (!defined('GNUSOCIAL')) { exit(1); }
6 * Poll a feed based on its urlhash, the full url is in the feedsub table
8 * @author Mikael Nordfeldth <mmn@hethane.se>
10 class FeedPollQueueHandler extends QueueHandler
12 public function transport()
14 return FeedPoll::QUEUE_CHECK;
17 public function handle($item)
19 $feedsub = FeedSub::getKV('id', $item['id']);
20 if (!$feedsub instanceof FeedSub) {
21 // Removed from the feedsub table I guess
24 if (!$feedsub->sub_state == 'nohub') {
25 // We're not supposed to poll this (either it's PuSH or it's unsubscribed)
30 FeedPoll::checkUpdates($feedsub);
31 } catch (Exception $e) {
32 common_log(LOG_ERR, "Failed to check feedsub id= ".$feedsub->id.' ("'.$e->getMessage().'")');