Skip to content

Commit

Permalink
fix(feeds): move last digest to end of cron
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Dec 13, 2024
1 parent 2fd228b commit 2bc909f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion feeds/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 2bc909f

Please sign in to comment.