- 🇪🇨Ecuador jwilson3
Follow. Not only is cron affected, but also
drush feed-im
is affected. - First commit to issue fork.
- last update
over 1 year ago 703 pass - last update
over 1 year ago 703 pass - last update
about 1 year ago 716 pass
Since Feeds 8.x-3.0-alpha7 the expire feature was accidentally broken. This happened when doing some refactoring in #2811429: Switch to feed owner during manual import. → .
Specifically, FeedsImportHandler used to have the following code:
/**
* Finishes importing, or starts unfinished stages.
*
* @param \Drupal\feeds\FeedInterface $feed
* The feed.
*/
public function batchPostProcess(FeedInterface $feed) {
if ($feed->progressParsing() !== StateInterface::BATCH_COMPLETE) {
$this->startBatchParse($feed);
}
elseif ($feed->progressFetching() !== StateInterface::BATCH_COMPLETE) {
$this->startBatchFetch($feed);
}
elseif ($feed->progressCleaning() !== StateInterface::BATCH_COMPLETE) {
$this->startBatchClean($feed);
}
else {
$feed->finishImport();
$feed->startBatchExpire();
}
}
See one of the last line, where it says $feed->startBatchExpire();
. This line got vanished. Something like it should have been added to FeedsExecutable::finish()
(or FeedsBatchExecutable::finish()
, since the expire feature didn't even work on cron yet).
Expected result: the items that were imported an hour ago and that were not updated, should have been deleted.
Actual result: the expire batch does not happen.
It would be cool if the expire feature works both on cron and in the UI. But if that's a lot of work, we can for now probably also restore the functionality by triggering the expiration in FeedsBatchExecutable::finish()
.
We do need a functional test to ensure that the expire batch gets triggered.
None.
Probably none.
None.
Needs work
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Follow. Not only is cron affected, but also drush feed-im
is affected.