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

Function init_blocking

monkey/monkey.py:223–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221 assert(resp[:3] == "+OK".encode('utf-8'))
222
223def init_blocking():
224 global clients
225 if numkeys > 100 * numclients:
226 print("WARNING: High ratio of keys to clients. Most lpushes will not be popped and unblocking will take a long time!")
227 for i in range(numclients):
228 clients.append(Client('127.0.0.1', 6379))
229 if i % 2:
230 handle_blpop_response(clients[-1])
231 else:
232 handle_lpush_response(clients[-1])
233
234def init_lpush():
235 global clients

Callers

nothing calls this directly

Calls 5

printFunction · 0.85
ClientClass · 0.85
handle_blpop_responseFunction · 0.85
handle_lpush_responseFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected