MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / swapDbCallback

Function swapDbCallback

tests/modules/hooks.c:260–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void swapDbCallback(RedisModuleCtx *ctx, RedisModuleEvent e, uint64_t sub, void *data)
261{
262 REDISMODULE_NOT_USED(e);
263 REDISMODULE_NOT_USED(sub);
264
265 RedisModuleSwapDbInfo *ei = data;
266 LogNumericEvent(ctx, "swapdb-first", ei->dbnum_first);
267 LogNumericEvent(ctx, "swapdb-second", ei->dbnum_second);
268}
269
270/* This function must be present on each Redis module. It is used in order to
271 * register the commands into the Redis server. */

Callers

nothing calls this directly

Calls 1

LogNumericEventFunction · 0.85

Tested by

no test coverage detected