mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
slices index are exclusive on the right
This commit is contained in:
parent
a10ca40cb6
commit
8c1ed47d1a
1 changed files with 2 additions and 1 deletions
|
@ -276,7 +276,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
oldest = i
|
||||
}
|
||||
|
||||
tt := msgs.Children[:oldest]
|
||||
tt := msgs.Children[:oldest+1]
|
||||
|
||||
nc.logger.WithFields(logrus.Fields{
|
||||
"accountID": id,
|
||||
|
@ -285,6 +285,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
|
||||
// Set latest message we alerted on
|
||||
latestMsg := tt[0]
|
||||
|
||||
if err = nc.db.BeginFunc(ctx, func(tx pgx.Tx) error {
|
||||
stmt := `
|
||||
UPDATE accounts
|
||||
|
|
Loading…
Reference in a new issue