Introduce pause/skip setting for excluding feeds from cron update

alex_b - March 10, 2008 - 23:20
Project:FeedAPI
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:critical
Assigned:alex_b
Status:closed
Description

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

#1

mikeryan - March 11, 2008 - 00:18

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

Aron Novak - March 13, 2008 - 19:18
Category:bug report» task

Why is it a bug? It's confusing.

#3

alex_b - March 17, 2008 - 22:03
Status:needs review» needs work

Mike brought 2 good objections here. Needs work.

#4

samc - March 18, 2008 - 23:43

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

alex_b - March 19, 2008 - 21:20
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

Aron Novak - March 28, 2008 - 16:38

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

mustafau - March 28, 2008 - 19:46

"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

Aron Novak - April 4, 2008 - 20:13
Status:needs work» fixed

The stuff is committed.

#9

Summit - April 4, 2008 - 22:40

Hi Aron,

Thank you for committing this!
greetings,
Martijn

#10

budda - April 16, 2008 - 08:30

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

Anonymous (not verified) - April 30, 2008 - 08:32
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.