use BulkRun Results to count insert
This commit is contained in:
parent
1ec55417d1
commit
90177973fe
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
main.go
2
main.go
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
_Version = "v4.4.3"
|
||||
_Version = "v4.4.4"
|
||||
_Producer = 0
|
||||
_Consumer = 1
|
||||
_Remover = 2
|
||||
|
|
Loading…
Add table
Reference in a new issue