Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Commit 1abd16b

Browse files
committed
[SPARK-241] Docstring.
1 parent a04d03e commit 1abd16b

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/packages/fuelrats_api/v3/interface.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,23 @@ async def _get_rats_from_nickname(self, key: str, impersonation: Impersonation)
210210
return rats
211211

212212
async def execute(self, work: Request, retry: bool = False) -> Response:
213+
"""
214+
Attempts to execute the work item against the underlying connection.
215+
216+
This method will attempt to retry if a retry has not been attempted (`retry`=False).
217+
This method achieves that by destroying the existing connection and restarting the
218+
Relevant worker, then recursively calling itself with retry=True
219+
220+
Args:
221+
work: work item
222+
retry: is this call a retry attempt?
223+
224+
Returns:
225+
Response object
226+
227+
Raises:
228+
Hardfail from underlying API error, if connection is still dead after a retry.
229+
"""
213230
await self.ensure_connection()
214231

215232
try:

0 commit comments

Comments
 (0)