General question. In D6 FeedAPI I recall that the cron would import feed items for the parent feed even if it was unpublished. Is this the case with Feeds? Are there settings that need to be set?
If it does, is this the code to adjust to check if importer is published? Please advise on how to adjust it (sorry for my lack of programming skills in advance).
function feeds_cron() {
if ($importers = feeds_reschedule()) {
foreach ($importers as $id) {
feeds_importer($id)->schedule();
$rows = db_query("SELECT feed_nid FROM {feeds_source} WHERE id = :id", array(':id' => $id));
foreach ($rows as $row) {
feeds_source($id, $row->feed_nid)->schedule();
}
}
feeds_reschedule(FALSE);
Comments
Comment #1
hellomobe commentedI don't have my cron set up yet to test this, but here is my change - feedback welcome.
Comment #2
hellomobe commentedThis isn't working. When I clear the cache it still runs the unpublished feeds. (I really don't understand why it's running when the cache is cleared).
Comment #3
twistor commentedThis is doable, but it would have to be done in a backwards-compatible, and configurable way.
Comment #4
steven.wichers commentedHere's a patch for #1. I haven't tested if it actually works beyond comparing the result of a count() with and without restricting by node status (there was a difference).
Comment #5
liquidcms commentedfirst test seems to show that patch in #4 does NOT work. will test more tomorrow.
Comment #6
tyler-durden commentedI'm not a programmer so I can't help, but as a user I'd think there should be a way to control the feed of each individual importer. Right now your only option is to delete it to stop it feeding, unless I am missing something. I need this individual control, and unpublishing it to turn it off would make logical sense.
Did this get anywhere? Last post mentions looking into why it didn't work tomorrow, but "tomorrow" was over 19 weeks ago.
Comment #7
jadhavdevendra commented#4 does not work. Is anyone working on this?
Comment #8
jadhavdevendra commentedCurrent workaround & assumptions -
Comment #9
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.