Right now Feeds keeps on pulling even if there is a successful PuSH notification subscription for a feed.

The underlying reason is that feeds_scheduler() is not fine grained enough, it can only control the schedule periods per importer, not per source to be imported. This particular issue should be addressed with #721428: Make scheduler next scheduled time based.

Once this patch is in, we can start slowing down subscriptions that receive PuSH notifications. I would suggest to slow down to one update per day or similar. This may need to be configurable.

Comments

alex_b’s picture

Status: Active » Needs work
StatusFileSize
new3.82 KB

- Splits verifyRequest() in verifyRequest() and verificationResponse() to intercept status (yes/no) of verification step.
- Adds pseudo code for slowing down schedule period if request was successful.

alex_b’s picture

StatusFileSize
new4.43 KB

This is a little more matured, it considers the fact that a verification request can be for 'subscribe' and 'unsubscribe'.

alex_b’s picture

Title: PubSubHubbub: slow subscriptions that are subscribed to hub » PubSubHubbub: slow down import period of feeds that are subscribed to hub
alex_b’s picture

Title: PubSubHubbub: slow down import period of feeds that are subscribed to hub » PubSubHubbub: slow down import frequency of feeds that are subscribed to hub
AntiNSA’s picture

subscribe

alex_b’s picture

Status: Needs work » Needs review
StatusFileSize
new2.23 KB

#908964: Break out job scheduler Makes this easy:

    public function schedule() {
+    // Check whether any fetcher is overriding the import period.
+    $period = $this->importer->config['import_period'];
+    $fetcher_period = $this->fetcher->importPeriod($this);
+    if (is_numeric($fetcher_period)) {
+      $period = $fetcher_period;
+    }
     $job = array(
       'callback' => 'feeds_source_import',
       'type' => $this->id,
       'id' => $this->feed_nid,
       // Schedule as soon as possible if a batch is active.
-      'period' => $this->batch ? 0 : $this->importer->config['import_period'],
+      'period' => $this->batch ? 0 : $period,
       'periodic' => TRUE,
     );
alex_b’s picture

StatusFileSize
new2.24 KB

$this->importer->fetcher->importPeriod($this)

not

$this->fetcher->importPeriod($this)

alex_b’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.