Skip to content

Commit

Permalink
async: enable retry logic also for response bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
d70-t committed Mar 11, 2022
1 parent 5286e26 commit 5c9bca4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ipfsspec/async_ipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ async def cid_head(self, path, session, headers=None, **kwargs):
async def cid_get(self, path, session, headers=None, **kwargs):
return await self._gw_op(lambda gw: gw.cid_get(path, session, headers=headers, **kwargs))

async def cat(self, path, session):
return await self._gw_op(lambda gw: gw.cat(path, session))

async def ls(self, path, session):
return await self._gw_op(lambda gw: gw.ls(path, session))

def state_report(self):
return "\n".join(f"{s.next_request_time}, {gw}" for s, gw in self.gws)

Expand Down

0 comments on commit 5c9bca4

Please sign in to comment.