@@ -149,8 +149,8 @@ export class CliBusinessService {
149
149
const replyEncoding = checkHumanReadableCommands ( `${ command } ${ args [ 0 ] } ` ) ? 'utf8' : undefined ;
150
150
this . checkUnsupportedCommands ( `${ command } ${ args [ 0 ] } ` ) ;
151
151
152
- const reply = await this . cliTool . execCommand ( clientOptions , command , args , replyEncoding ) ;
153
152
namespace = this . cliTool . getRedisClientNamespace ( clientOptions ) ;
153
+ const reply = await this . cliTool . execCommand ( clientOptions , command , args , replyEncoding ) ;
154
154
155
155
this . logger . log ( 'Succeed to execute redis CLI command.' ) ;
156
156
this . cliAnalyticsService . sendCommandExecutedEvent (
@@ -225,6 +225,8 @@ export class CliBusinessService {
225
225
const [ command , ...args ] = splitCliCommandLine ( commandLine ) ;
226
226
const replyEncoding = checkHumanReadableCommands ( `${ command } ${ args [ 0 ] } ` ) ? 'utf8' : undefined ;
227
227
this . checkUnsupportedCommands ( `${ command } ${ args [ 0 ] } ` ) ;
228
+ namespace = this . cliTool . getRedisClientNamespace ( clientOptions ) ;
229
+
228
230
const result = await this . cliTool . execCommandForNodes (
229
231
clientOptions ,
230
232
command ,
@@ -233,7 +235,6 @@ export class CliBusinessService {
233
235
replyEncoding ,
234
236
) ;
235
237
236
- namespace = this . cliTool . getRedisClientNamespace ( clientOptions ) ;
237
238
return result . map ( ( nodeExecReply ) => {
238
239
this . cliAnalyticsService . sendClusterCommandExecutedEvent (
239
240
clientOptions . instanceId ,
0 commit comments