mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Use a transaction to refresh and create entries
Also includes few database improvements: - Speed up entries clean up with an index and a goroutine - Avoid the accumulation of enclosures for some feeds
This commit is contained in:
parent
bfb96d536e
commit
e6c6ee441a
7 changed files with 64 additions and 41 deletions
|
@ -141,7 +141,7 @@ func (h *Handler) RefreshFeed(userID, feedID int64) error {
|
|||
processor.ProcessFeedEntries(h.store, originalFeed)
|
||||
|
||||
// We don't update existing entries when the crawler is enabled (we crawl only inexisting entries).
|
||||
if storeErr := h.store.UpdateEntries(originalFeed.UserID, originalFeed.ID, originalFeed.Entries, !originalFeed.Crawler); storeErr != nil {
|
||||
if storeErr := h.store.RefreshFeedEntries(originalFeed.UserID, originalFeed.ID, originalFeed.Entries, !originalFeed.Crawler); storeErr != nil {
|
||||
originalFeed.WithError(storeErr.Error())
|
||||
h.store.UpdateFeedError(originalFeed)
|
||||
return storeErr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue