Skip to content

Commit

Permalink
Merge pull request #2280 from opentensor/feat/roman/add-subtensor-rec…
Browse files Browse the repository at this point in the history
…onnection-logic

Add reconnection logic + tests
  • Loading branch information
roman-opentensor authored and ibraheem-opentensor committed Sep 4, 2024
1 parent bbe9f92 commit 55d01a8
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 28 deletions.
2 changes: 2 additions & 0 deletions bittensor/extrinsics/serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import bittensor
import bittensor.utils.networking as net
from bittensor.utils import format_error_message
from bittensor.utils.networking import ensure_connected
from ..errors import MetadataError


Expand Down Expand Up @@ -269,6 +270,7 @@ def publish_metadata(
raise MetadataError(format_error_message(response.error_message))


@ensure_connected
def get_metadata(self, netuid: int, hotkey: str, block: Optional[int] = None) -> str:
@retry(delay=2, tries=3, backoff=2, max_delay=4)
def make_substrate_call_with_retry():
Expand Down
Loading

0 comments on commit 55d01a8

Please sign in to comment.