@@ -503,7 +503,6 @@ export function setInitialStateByType(type: string) {
503
503
}
504
504
// Asynchronous thunk action
505
505
export function fetchPatternKeysAction (
506
- scanThreshold : number ,
507
506
cursor : string ,
508
507
count : number ,
509
508
telemetryProperties : { [ key : string ] : any } = { } ,
@@ -520,6 +519,7 @@ export function fetchPatternKeysAction(
520
519
sourceKeysFetch = CancelToken . source ( )
521
520
522
521
const state = stateInit ( )
522
+ const scanThreshold = state . user . settings . config ?. scanThreshold || SCAN_COUNT_DEFAULT ;
523
523
const { search : match , filter : type } = state . browser . keys
524
524
const { encoding } = state . app . info
525
525
@@ -1169,12 +1169,11 @@ export function fetchKeys(
1169
1169
) {
1170
1170
return async ( dispatch : AppDispatch , stateInit : ( ) => RootState ) => {
1171
1171
const state = stateInit ( )
1172
- const scanThreshold = state . user . settings . config ?. scanThreshold || SCAN_COUNT_DEFAULT ;
1173
1172
const isRedisearchExists = isRedisearchAvailable ( state . connections . instances . connectedInstance . modules )
1174
1173
const { searchMode, count, cursor, telemetryProperties } = options
1175
1174
1176
1175
return searchMode === SearchMode . Pattern || ! isRedisearchExists
1177
- ? dispatch < any > ( fetchPatternKeysAction ( scanThreshold , cursor , count , telemetryProperties , onSuccess , onFailed ) )
1176
+ ? dispatch < any > ( fetchPatternKeysAction ( cursor , count , telemetryProperties , onSuccess , onFailed ) )
1178
1177
: dispatch < any > ( fetchRedisearchKeysAction ( cursor , count , telemetryProperties , onSuccess , onFailed ) )
1179
1178
}
1180
1179
}
0 commit comments