Created
June 5, 2016 07:29
-
-
Save rishiloyola/d1f06e59295ad4e57f0e75951fb19d13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (a *Appbase) commitBulk(commitNow bool) { | |
if a.bulkBodySize >= a.bulkSize || a.bulkService.NumberOfActions() >= APPBASE_BUFFER_LEN || commitNow { | |
a.count += a.bulkService.NumberOfActions() | |
_, err := a.bulkService.Do() | |
if err != nil { | |
a.pipe.Err <- NewError(CRITICAL, a.path, fmt.Sprintf("appbase error (%s)", err), nil) | |
a.pipe.Stop() | |
} | |
a.bulkBodySize = 0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment