use BulkRun Results to count insert

This commit is contained in:
Michele 2018-10-25 16:50:49 +02:00
parent 1ec55417d1
commit 90177973fe
2 changed files with 3 additions and 3 deletions

View file

@ -129,7 +129,7 @@ func consumer() {
for _, val := range bulk {
for j, bl := range val {
_, err := bl.Run()
result, err := bl.Run()
if j == 0 {
if err != nil {
if !strings.Contains(err.Error(), "E11000") {
@ -155,7 +155,7 @@ func consumer() {
}
counter <- Counterchan{
tipo: "ins",
val: len(prod.logins),
val: result.Modified,
}
}
}

View file

@ -14,7 +14,7 @@ import (
)
const (
_Version = "v4.4.3"
_Version = "v4.4.4"
_Producer = 0
_Consumer = 1
_Remover = 2