From 2bc909f7ce20a1eb7808382f41073456280ff01a Mon Sep 17 00:00:00 2001 From: Eric Bower Date: Fri, 13 Dec 2024 15:09:50 -0500 Subject: [PATCH] fix(feeds): move last digest to end of cron --- feeds/cron.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feeds/cron.go b/feeds/cron.go index b1b55708..612ab291 100644 --- a/feeds/cron.go +++ b/feeds/cron.go @@ -180,7 +180,6 @@ func (f *Fetcher) RunPost(logger *slog.Logger, user *db.User, post *db.Post) err expiresAt := time.Now().AddDate(0, 6, 0) post.ExpiresAt = &expiresAt } - post.Data.LastDigest = &now _, err = f.db.UpdatePost(post) if err != nil { return err @@ -245,6 +244,12 @@ Also, we have centralized logs in our pico.sh TUI that will display realtime fee } } + post.Data.LastDigest = &now + _, err = f.db.UpdatePost(post) + if err != nil { + return err + } + return nil }