sets the global execution context
| 165 | |
| 166 | // sets the global execution context |
| 167 | void QueryCtx_SetGlobalExecutionCtx |
| 168 | ( |
| 169 | CommandCtx *cmd_ctx |
| 170 | ) { |
| 171 | ASSERT(cmd_ctx != NULL); |
| 172 | |
| 173 | QueryCtx *ctx = _QueryCtx_GetCreateCtx(); |
| 174 | |
| 175 | ctx->gc = CommandCtx_GetGraphContext(cmd_ctx); |
| 176 | ctx->query_data.query = CommandCtx_GetQuery(cmd_ctx); |
| 177 | ctx->global_exec_ctx.bc = CommandCtx_GetBlockingClient(cmd_ctx); |
| 178 | ctx->global_exec_ctx.redis_ctx = CommandCtx_GetRedisCtx(cmd_ctx); |
| 179 | ctx->global_exec_ctx.command_name = CommandCtx_GetCommandName(cmd_ctx); |
| 180 | |
| 181 | // copy command's timer |
| 182 | simple_timer_copy(cmd_ctx->timer, ctx->stats.timer); |
| 183 | |
| 184 | // received timestamp (epoch time) |
| 185 | ctx->stats.received_ts = cmd_ctx->received_ts; |
| 186 | } |
| 187 | |
| 188 | // set the provided AST for access through the QueryCtx |
| 189 | void QueryCtx_SetAST |
no test coverage detected