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

Function watchCommand

src/multi.cpp:432–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432void watchCommand(client *c) {
433 int j;
434
435 if (c->flags & CLIENT_MULTI) {
436 addReplyError(c,"WATCH inside MULTI is not allowed");
437 return;
438 }
439 for (j = 1; j < c->argc; j++)
440 watchForKey(c,c->argv[j]);
441 addReply(c,shared.ok);
442}
443
444void unwatchCommand(client *c) {
445 unwatchAllKeys(c);

Callers

nothing calls this directly

Calls 3

addReplyErrorFunction · 0.85
watchForKeyFunction · 0.85
addReplyFunction · 0.85

Tested by

no test coverage detected