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

@@ -12,7 +12,8 @@ import (
"git.k-space.ee/k-space/logmower-shipper/pkg/lines"
m "git.k-space.ee/k-space/logmower-shipper/pkg/mongo"
"git.k-space.ee/k-space/logmower-shipper/pkg/sender"
"github.com/jtagcat/util"
"github.com/jtagcat/util/std"
"github.com/jtagcat/util/tail"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
mongoOpt "go.mongodb.org/mongo-driver/mongo/options"
@@ -64,7 +65,7 @@ func (f File) launchChannels(cancel func(), db *mongo.Collection) (_ chan<- line
dbQueue := make(chan m.Record, SendQueueLimit)
go lines.RawC(lineOut).Process(sctx, dbQueue)
waitBatchSend := util.GoWg(func() {
waitBatchSend := std.GoWg(func() {
sender.Queue(dbQueue).Sender(db, f.MetricsName, cancelAll)
})
@@ -102,7 +103,7 @@ func (f File) process(ctx context.Context, db *mongo.Collection) error {
}
startSize := fi.Size()
lineIn, errChan, err := util.TailFile(sctx, f.Path, dbOffset, io.SeekStart)
lineIn, errChan, err := tail.New(sctx, f.Path, dbOffset, io.SeekStart)
if err != nil {
return fmt.Errorf("tailing file: %w", err)
}