Skip to content

Commit 7c4bb08

Browse files
internal: move default yield_every value
Part of #312
1 parent 45266aa commit 7c4bb08

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crud/common/const.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ const.NEED_SHARDING_RELOAD = 0x0001001
1010

1111
const.DEFAULT_VSHARD_CALL_TIMEOUT = 2
1212

13+
const.DEFAULT_YIELD_EVERY = 1000
14+
1315
return const

crud/count.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ local compare_conditions = require('crud.compare.conditions')
1818
local CountError = errors.new_class('CountError', {capture_stack = false})
1919

2020
local COUNT_FUNC_NAME = '_crud.count_on_storage'
21-
local DEFAULT_YIELD_EVERY = 1000
2221

2322
local count = {}
2423

@@ -221,7 +220,7 @@ local function call_count_on_router(vshard_router, space_name, user_conditions,
221220
skip_sharding_hash_check = true
222221
end
223222

224-
local yield_every = opts.yield_every or DEFAULT_YIELD_EVERY
223+
local yield_every = opts.yield_every or const.DEFAULT_YIELD_EVERY
225224

226225
local call_opts = {
227226
mode = opts.mode or 'read',

0 commit comments

Comments
 (0)