initial work for smarter database cleanup
This commit is contained in:
parent
de3decbffd
commit
d0b83babd2
5 changed files with 93 additions and 6 deletions
|
|
@ -194,3 +194,15 @@ func (s *Storage) GetFeedErrors() map[int64]string {
|
|||
}
|
||||
return errors
|
||||
}
|
||||
|
||||
func (s *Storage) SetFeedSize(feedId int64, size int) {
|
||||
_, err := s.db.Exec(`
|
||||
insert into feed_sizes (feed_id, size)
|
||||
values (?, ?)
|
||||
on conflict (feed_id) do update set size = excluded.size`,
|
||||
feedId, size,
|
||||
)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue