Hi,

I need to expire items specifically by certain $source->feed_nid.

Currently, the clear() function works in this manner, $source is available and you can work with it.
I need this for the expire() function. It's run through FeedsSource.inc

The expire() function is called from FeedsImporter.inc,

  public function expire($time = NULL) {
    return $this->processor->expire($time);
  }

How to change this, to pass the $source to expire(FeedsSource $source) ?

Comments

Anonymous’s picture

Status: Active » Fixed

I implemented a custom "feeds_importer_wipe" series of functions.

function feeds_importer_wipe($job) {
  $source = feeds_source($job['type'], $job['id']);
  try {
    $source->existing()->wipe();
  }
  catch (FeedsNotExistingException $e) {
    // Do nothing.
  }
  catch (Exception $e) {
    $source->log('wipe', $e->getMessage(), array(), WATCHDOG_ERROR);
  }
  $source->scheduleWipe();
}

So now I can do "wiping items by source->feed_nid" as I need to.

emackn’s picture

Great! How are you running this anyway? via UI or drush command?

Status: Fixed » Closed (fixed)

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