You are here

public function FeedsSource::scheduleClear in Feeds 7.2

Schedule background clearing tasks.

File

includes/FeedsSource.inc, line 475
Definition of FeedsSourceInterface, FeedsState and FeedsSource class.

Class

FeedsSource
Holds the source of a feed to import.

Code

public function scheduleClear() {
  $job = array(
    'type' => $this->id,
    'id' => $this->feed_nid,
  );
  if ($this
    ->progressClearing() !== FEEDS_BATCH_COMPLETE) {

    // Feed is not fully cleared yet, so we put this job back in the queue
    // immediately for further processing.
    $queue = DrupalQueue::get('feeds_source_clear');
    $queue
      ->createItem($job);
  }
}