public function FeedSubscriber::afterProcess in Feeds 8.3
Delays execution after limit is reached.
File
- tests/
modules/ feeds_test_multiple_cron_runs/ src/ EventSubscriber/ FeedSubscriber.php, line 28
Class
- FeedSubscriber
- Subscribes to feeds events.
Namespace
Drupal\feeds_test_multiple_cron_runs\EventSubscriberCode
public function afterProcess(ProcessEvent $event) {
static $processed = 0;
$processed++;
$limit = \Drupal::config('feeds_test_multiple_cron_runs.settings')
->get('import_queue_time');
if ($processed == $limit) {
sleep($limit);
}
}