mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-29 07:07: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
|
oldest = i
|
||||||
}
|
}
|
||||||
|
|
||||||
tt := msgs.Children[:oldest]
|
tt := msgs.Children[:oldest+1]
|
||||||
|
|
||||||
nc.logger.WithFields(logrus.Fields{
|
nc.logger.WithFields(logrus.Fields{
|
||||||
"accountID": id,
|
"accountID": id,
|
||||||
|
@ -285,6 +285,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
||||||
|
|
||||||
// Set latest message we alerted on
|
// Set latest message we alerted on
|
||||||
latestMsg := tt[0]
|
latestMsg := tt[0]
|
||||||
|
|
||||||
if err = nc.db.BeginFunc(ctx, func(tx pgx.Tx) error {
|
if err = nc.db.BeginFunc(ctx, func(tx pgx.Tx) error {
|
||||||
stmt := `
|
stmt := `
|
||||||
UPDATE accounts
|
UPDATE accounts
|
||||||
|
|
Loading…
Reference in a new issue