Commit 8a587e68 authored by 宋柯's avatar 宋柯

redis清理

parent cf8ba4bb
......@@ -296,12 +296,14 @@ for search_key in search_keys:
node_has_del_key_count = 0
for batch_start_idx in range(len(node_del_key_list), node_del_batch_size):
node_del_key_batch_list = node_del_key_list[batch_start_idx : batch_start_idx + node_del_batch_size]
pipline = conn.pipeline()
# pipline = conn.pipeline()
for node_del_key in node_del_key_batch_list:
pipline.delete(node_del_key)
pipline.execute()
# pipline.delete(node_del_key)
pass
# pipline.execute()
node_has_del_key_count += len(node_del_key_batch_list)
print("node: {}, node_has_del_key_count: {}, node_del_key_count: {}, node_has_del_key_rate: {}%".format(node, node_has_del_key_count, node_del_key_count, 100 * node_has_del_key_count / node_del_key_count))
print("node: {}, node_has_del_key_batch_sample_50: {}".format(node, np.random.choice(node_del_key_batch_list, 50, replace= False)))
print("")
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment