Changeset 12d0c38bccca…
Parent 8f8afbe56fc7…
by Benjamin Pollack
Changes to one file · Browse files at 12d0c38bccca Showing diff from parent 8f8afbe56fc7 Diff from another changeset...
@@ -252,6 +252,14 @@ self.log(client, 'SET %s -> %s' % (key, data))
return True
+ def handle_setnx(self, client, key, data):
+ if key in client.table:
+ self.log(client, 'SETNX %s -> %s FAILED' % (key, data))
+ return 0
+ client.table[key] = data
+ self.log(client, 'SETNX %s -> %s' % (key, data))
+ return 1
+
def handle_shutdown(self, client):
self.log(client, 'SHUTDOWN')
self.halt = True
|
Loading...