1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class FeedPollQueueHandler extends QueueHandler
- {
- public function transport()
- {
- return FeedPoll::QUEUE_CHECK;
- }
- public function handle($item)
- {
- $feedsub = FeedSub::getKV('id', $item['id']);
- if (!$feedsub instanceof FeedSub) {
-
- return true;
- }
- if (!$feedsub->sub_state == 'nohub') {
-
- return true;
- }
- try {
- FeedPoll::checkUpdates($feedsub);
- } catch (Exception $e) {
- common_log(LOG_ERR, "Failed to check feedsub id= ".$feedsub->id.' ("'.$e->getMessage().'")');
- }
- return true;
- }
- }
|