mirror of https://github.com/skygpu/skynet.git
update check_connect to return list of peers
parent
f8c744e6b4
commit
6a6bdaab0d
|
@ -211,8 +211,8 @@ class SkynetGPUConnector:
|
||||||
img = Image.open(io.BytesIO(raw_img))
|
img = Image.open(io.BytesIO(raw_img))
|
||||||
img.save(f'ipfs-docker-staging/image.png')
|
img.save(f'ipfs-docker-staging/image.png')
|
||||||
|
|
||||||
# check for connections to peers, reconnect if none
|
# check peer connections, reconnect to skynet gateway if not
|
||||||
peers = self.ipfs_node.check_connect().splitlines()
|
peers = self.ipfs_node.check_connect()
|
||||||
if self.ipfs_url not in peers:
|
if self.ipfs_url not in peers:
|
||||||
self.ipfs_node.connect(self.ipfs_url)
|
self.ipfs_node.connect(self.ipfs_url)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class IPFSDocker:
|
||||||
logging.error(out)
|
logging.error(out)
|
||||||
assert ec == 0
|
assert ec == 0
|
||||||
|
|
||||||
return out
|
return out.splitlines()
|
||||||
|
|
||||||
|
|
||||||
@cm
|
@cm
|
||||||
|
|
Loading…
Reference in New Issue