update check_connect to return list of peers

pull/8/head
Konstantine Tsafatinos 2023-06-26 12:43:00 -04:00
parent f8c744e6b4
commit 6a6bdaab0d
2 changed files with 3 additions and 3 deletions

View File

@ -211,8 +211,8 @@ class SkynetGPUConnector:
img = Image.open(io.BytesIO(raw_img))
img.save(f'ipfs-docker-staging/image.png')
# check for connections to peers, reconnect if none
peers = self.ipfs_node.check_connect().splitlines()
# check peer connections, reconnect to skynet gateway if not
peers = self.ipfs_node.check_connect()
if self.ipfs_url not in peers:
self.ipfs_node.connect(self.ipfs_url)

View File

@ -47,7 +47,7 @@ class IPFSDocker:
logging.error(out)
assert ec == 0
return out
return out.splitlines()
@cm