Skip to content
Snippets Groups Projects
Commit 208b9508 authored by Youri van Koppen's avatar Youri van Koppen
Browse files

Save feed when unlocking because of resetting queued time.

parent da04deee
No related branches found
No related tags found
No related merge requests found
......@@ -364,8 +364,8 @@ class Feed extends ContentEntityBase implements FeedInterface {
$this->set('next', $interval + $time);
}
$this->save();
$this->unlock();
$this->save();
}
/**
......@@ -519,13 +519,13 @@ class Feed extends ContentEntityBase implements FeedInterface {
*/
public function unlock() {
\Drupal::service('feeds.lock')->release("feeds_feed:{$this->id()}");
// @todo clean up stale queue tasks.
Cache::invalidateTags(['feeds_feed_locked']);
// Clean up stuff.
// Clean up import states and stale queue tasks.
$this->clearStates();
$this->setQueuedTime(0);
$this->clearQueueTasks();
$this->save();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment