def load_oob(host, name, key): from disco.ddfs import DDFS ddfs = DDFS(host) # NB: this assumes that blobs are listed in LIFO order. # We want to return the latest version for fd in ddfs.pull(ddfs.job_oob(name), blobfilter=lambda x: x == key): return fd.read()
def save_oob(host, name, key, value, ddfs_token=None): from disco.ddfs import DDFS DDFS(host).push(DDFS.job_oob(name), [(StringIO(value), key)], delayed=True)
def save_oob(host, name, key, value, ddfs_token=None): from disco.ddfs import DDFS DDFS(host).push(DDFS.job_oob(name), [(BytesIO(value), key)], delayed=True)