Update pinner to new apis

pull/26/head
Guillermo Rodriguez 2023-10-12 10:20:19 -03:00
parent d9df50ad63
commit 8ddbf65d9f
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
1 changed files with 3 additions and 3 deletions

View File

@ -85,9 +85,9 @@ class SkynetPinner:
for _ in range(6):
try:
with trio.move_on_after(5):
resp = await self.ipfs_http.pin(cid)
if resp.status_code != 200:
logging.error(f'error pinning {cid}:\n{resp.text}')
pins = await self.ipfs_http.pin(cid)
if cid not in pins:
logging.error(f'error pinning {cid}')
del self._pinned[cid]
else: