this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

don't persist zero / negative cursors

+3
+3
cmd/relay/relay/host.go
··· 119 119 func (r *Relay) PersistHostCursors(ctx context.Context, cursors *[]HostCursor) error { 120 120 tx := r.db.WithContext(ctx).Begin() 121 121 for _, cur := range *cursors { 122 + if cur.LastSeq <= 0 { 123 + continue 124 + } 122 125 if err := tx.WithContext(ctx).Model(models.Host{}).Where("id = ?", cur.HostID).UpdateColumn("last_seq", cur.LastSeq).Error; err != nil { 123 126 r.Logger.Error("failed to persist host cursor", "hostID", cur.HostID, "lastSeq", cur.LastSeq) 124 127 }