You are here

function feeds_source_import in Feeds 6

Same name and namespace in other branches
  1. 8.2 feeds.module \feeds_source_import()
  2. 7.2 feeds.module \feeds_source_import()
  3. 7 feeds.module \feeds_source_import()

Scheduler callback for importing from a source.

Related topics

3 string references to 'feeds_source_import'
FeedsSource::delete in includes/FeedsSource.inc
Delete configuration. Removes configuration information from database, does not delete configuration itself.
FeedsSource::schedule in includes/FeedsSource.inc
Schedule this source.
feeds_cron_queue_info in ./feeds.module
Implementation of hook_cron_queue_info().

File

./feeds.module, line 63
Feeds - basic API functions and hook implementations.

Code

function feeds_source_import($job) {
  $source = feeds_source($job['type'], $job['id']);
  try {
    $source
      ->existing()
      ->import();
  } catch (FeedsNotExistingException $e) {

    // Do nothing.
  } catch (Exception $e) {
    watchdog('feeds_source_import()', $e
      ->getMessage(), array(), WATCHDOG_ERROR);
  }
  $source
    ->schedule();
}