mirror of https://github.com/skygpu/skynet.git
change ipfs reconnect logic, use config vars
parent
8f24c72762
commit
acd8ba91e5
|
@ -212,10 +212,9 @@ class SkynetGPUConnector:
|
||||||
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 for connections to peers, reconnect if none
|
||||||
peers = self.ipfs_node.check_connect()
|
peers = self.ipfs_node.check_connect().splitlines()
|
||||||
if peers == "":
|
if self.ipfs_url not in peers:
|
||||||
self.ipfs_node.connect(
|
self.ipfs_node.connect(self.ipfs_url)
|
||||||
'/ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv')
|
|
||||||
|
|
||||||
ipfs_hash = self.ipfs_node.add('image.png')
|
ipfs_hash = self.ipfs_node.add('image.png')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue