update deps
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
2022-11-13 00:19:19 +02:00
parent 1c31b19fd2
commit e73c30689c
13 changed files with 175 additions and 166 deletions

View File

@@ -7,7 +7,8 @@ import (
"time"
m "git.k-space.ee/k-space/logmower-shipper/pkg/mongo"
"github.com/jtagcat/util"
"github.com/jtagcat/util/batch"
"github.com/jtagcat/util/retry"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"k8s.io/apimachinery/pkg/util/wait"
@@ -56,7 +57,7 @@ func (queue Queue) Sender(db *mongo.Collection, metricsFilename string, cancelOn
}
}()
util.Batch(MaxBatchItems, MaxBatchTime, queue, batched)
batch.Batch(MaxBatchItems, MaxBatchTime, queue, batched)
// returns when sendQueue is closed
}()
@@ -71,7 +72,7 @@ func (queue Queue) Sender(db *mongo.Collection, metricsFilename string, cancelOn
promShipperSynced.WithLabelValues(metricsFilename).Set(0)
err := util.RetryOnError(backoff(), func() (_ bool, _ error) {
err := retry.OnError(backoff(), func() (_ bool, _ error) {
result, err := insertManyWithSimulate(db, batch)
var succeedCount int