Ray PDB support (#11739)

This commit is contained in:
Philipp Moritz
2020-11-03 09:49:23 -08:00
committed by GitHub
parent 952b71dc94
commit 39ce0eadbe
8 changed files with 281 additions and 1 deletions
+9
View File
@@ -32,3 +32,12 @@ def _internal_kv_put(key, value, overwrite=False):
def _internal_kv_del(key):
return ray.worker.global_worker.redis_client.delete(key)
def _internal_kv_list(prefix):
"""List all keys in the internal KV store that start with the prefix."""
if isinstance(prefix, bytes):
pattern = prefix + b"*"
else:
pattern = prefix + "*"
return ray.worker.global_worker.redis_client.keys(pattern=pattern)