mirror of https://github.com/skygpu/skynet.git
Update pinner to new apis
parent
d9df50ad63
commit
8ddbf65d9f
|
@ -85,9 +85,9 @@ class SkynetPinner:
|
||||||
for _ in range(6):
|
for _ in range(6):
|
||||||
try:
|
try:
|
||||||
with trio.move_on_after(5):
|
with trio.move_on_after(5):
|
||||||
resp = await self.ipfs_http.pin(cid)
|
pins = await self.ipfs_http.pin(cid)
|
||||||
if resp.status_code != 200:
|
if cid not in pins:
|
||||||
logging.error(f'error pinning {cid}:\n{resp.text}')
|
logging.error(f'error pinning {cid}')
|
||||||
del self._pinned[cid]
|
del self._pinned[cid]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue