Download & Extend

Introduce pause/skip setting for excluding feeds from cron update

Project:FeedAPI
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:critical
Assigned:alex_b
Status:closed (fixed)

Issue Summary

This one needs everybody's attention because it changes FeedAPI's behavior a bit:

There is a need for deactivating feeds. But rather than adding yet another flag to the feedapi table I would like to attach this behavior to an existing one: the published workflow setting.

This could result in unexpected behavior if published/unpublished settings are used in a different context. If you are affected by this patch, please comment.

Alex

AttachmentSize
dont_update_unpublished_feeds.patch958 bytes

Comments

#1

I would like to be able to disable automatic feed refreshes independently of published status. Two use cases:

  1. As we discussed at the FeedAPI BoF, I would like to use my personal site as my feed reader. I haven't had time yet to really explore how I want to set it up, but I'm imagining having some feeds published (visible to all visitors) and some unpublished (private reading material).
  2. When I was doing some development with FeedAPI a couple of months ago, while working on the code I wanted to do all refreshing manually so I could check out exactly what was happening on each refresh, but turn refreshes back on between coding sessions. I ended up doing it by disabling cron, but an auto-refresh flag would be cleaner.

And, I just think conceptually "published" and "refresh automatically" are distinct concepts - I don't think it will occur to people wanting to stop a feed from refreshing temporarily that unpublish would be the way to do it.

#2

Category:bug report» task

Why is it a bug? It's confusing.

#3

Status:needs review» needs work

Mike brought 2 good objections here. Needs work.

#4

Just wanted to add that these are very different issues in my context as well. I have a number of sites that are primarily driven by aggregated content and I have all the FeedAPI nodes unpublished because in my case they are totally administrative. I don't want them, for example, showing up in user searches.

Seems like a "Pause" behavior would fit naturally under the Commands list at /admin/content/feed.

Sam

#5

Title:Don't update unpublished feeds» Introduce pause/skip setting for excluding feeds from cron update

This patch introduces a skip bit in the feedapi table. It also offers a UI for setting it (name of the feature on the UI level: 'pause feed').

Advantages:

* decoupled from published setting
* faster, because we don't need to join to node table for pulling feeds to be updated

Disadvantages (for the record):

* yet another setting
* this one isn't too bad: had to bend the settings handling of feedapi a bit, as we want this value stored in its own field in the db, not in a serialized array.
* no way of coupling unpublished and paused setting - this might be out of scope for module

Missing:

* pgsql integration

AttachmentSize
feedapi_skip_bit.patch 3.02 KB

#6

Here is the updated (pgsql-compatible) patch for 5.x. The 6.x patch is attached too.

AttachmentSize
skip_patch_v2.patch 2.01 KB
skip_patch_6x.patch 1.69 KB

#7

"break;" is misplaced inside feedapi_update_9().

case 'pgsql':
   break;
   $ret[] = update_sql("ALTER TABLE {feedapi} ADD skip SMALLINT NOT NULL DEFAULT '0'");
   $ret[] = update_sql("CREATE INDEX {feedapi}_skip_idx ON {feedapi} (skip)");

#8

Status:needs work» fixed

The stuff is committed.

#9

Hi Aron,

Thank you for committing this!
greetings,
Martijn

#10

Shame it was implemented as a skip bit, would have been better to provide an refresh interval per feed, and allow the interval to be set to 'never' which would effectively halt the aggregation until changed to a new time.

#11

Status:fixed» closed (fixed)

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