Skip to content

Commit

Permalink
fix: reduce disk writes
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Oct 14, 2023
1 parent ee4c0cc commit 2c28a36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/sephirah/internal/data/angela.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ func (a *angelaRepo) UpsertFeed(ctx context.Context, f *modelfeed.Feed) error {
SetImage(f.Image).
OnConflict(
sql.ConflictColumns(feed.FieldID),
sql.ResolveWithNewValues(),
//
// Update feed every time result in large disk writes
//
// sql.ResolveWithNewValues(),
sql.DoNothing(),
).
Exec(ctx)
if err != nil {
Expand Down Expand Up @@ -250,7 +254,7 @@ func (a *angelaRepo) UpsertFeedItems(
//
// resolveWithIgnores([]string{
// feeditem.FieldID,
//}),
// }),
sql.DoNothing(),
).Exec(ctx)
if err != nil {
Expand Down

0 comments on commit 2c28a36

Please sign in to comment.