function _feed_import_base_remove_running in Feed Import 8
Same name and namespace in other branches
- 7.3 feed_import_base/feed_import_base.module \_feed_import_base_remove_running()
Removes a feed from running array.
1 call to _feed_import_base_remove_running()
- _feed_import_base_process_feed in feed_import_base/
feed_import_base.module - Imports a feed.
1 string reference to '_feed_import_base_remove_running'
- _feed_import_base_process_feed in feed_import_base/
feed_import_base.module - Imports a feed.
File
- feed_import_base/
feed_import_base.module, line 235 - Basic settings for feed import base module
Code
function _feed_import_base_remove_running($feed) {
if (isset($feed->skip_remove_running)) {
unset($feed->skip_remove_running);
return;
}
$state = \Drupal::state();
$running = $state
->get('feed_import.running', array());
if (!empty($running[$feed->entity]) && ($pos = array_search($feed->machine_name, $running[$feed->entity])) !== FALSE) {
unset($running[$feed->entity][$pos]);
$state
->set('feed_import.running', $running);
}
}