implement Simulate and globalize BufferLimit
This commit is contained in:
@@ -15,6 +15,11 @@ const (
|
||||
DatabaseCommandTimeout = 10 * time.Second
|
||||
)
|
||||
|
||||
var (
|
||||
BufferLimitBytes int
|
||||
Simulate bool
|
||||
)
|
||||
|
||||
func MongoTimeout(ctx context.Context) context.Context {
|
||||
ctx, _ = context.WithTimeout(ctx, DatabaseCommandTimeout) //nolint:lostcancel (cancelled by mongo, should be bug on them //TODO)
|
||||
return ctx
|
||||
|
Reference in New Issue
Block a user