Merge pull request #6161 from swilly22/redismodule-loading-ctx-flag

Extend REDISMODULE_CTX_FLAGS to indicate if redis is  loading
This commit is contained in:
Salvatore Sanfilippo
2019-07-07 17:01:29 +02:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@ -1466,6 +1466,9 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
if (server.cluster_enabled)
flags |= REDISMODULE_CTX_FLAGS_CLUSTER;
if (server.loading)
flags |= REDISMODULE_CTX_FLAGS_LOADING;
/* Maxmemory and eviction policy */
if (server.maxmemory > 0) {
flags |= REDISMODULE_CTX_FLAGS_MAXMEMORY;