Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/check-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,16 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Get labels from PR
- name: Skip label check for manual runs
id: get-labels
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "Manual workflow dispatch detected, skipping PR label check."
echo "run-sdk-tests=true" >> $GITHUB_OUTPUT

- name: Get labels from PR
id: get-labels-pr
if: ${{ github.event_name == 'pull_request' }}
run: |
sleep 5
LABELS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels --jq '.[].name')
Expand Down
9 changes: 6 additions & 3 deletions async_substrate_interface/async_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def __init__(
self._received: dict[str, asyncio.Future] = {}
self._received_subscriptions: dict[str, asyncio.Queue] = {}
self._sending: Optional[asyncio.Queue] = None
self._send_recv_task = None
self._send_recv_task: Optional[asyncio.Task] = None
self._inflight: dict[str, str] = {}
self._attempts = 0
self._lock = asyncio.Lock()
Expand Down Expand Up @@ -747,7 +747,7 @@ async def _start_receiving(self, ws: ClientConnection) -> Exception:
elif isinstance(e, websockets.exceptions.ConnectionClosedOK):
logger.debug("Websocket connection closed.")
else:
logger.debug(f"Timeout occurred. Reconnecting.")
logger.debug(f"Timeout occurred.")
return e

async def _start_sending(self, ws) -> Exception:
Expand Down Expand Up @@ -780,7 +780,7 @@ async def _start_sending(self, ws) -> Exception:
elif isinstance(e, websockets.exceptions.ConnectionClosedOK):
logger.debug("Websocket connection closed.")
else:
logger.debug("Timeout occurred. Reconnecting.")
logger.debug("Timeout occurred.")
return e

async def send(self, payload: dict) -> str:
Expand Down Expand Up @@ -859,6 +859,9 @@ async def retrieve(self, item_id: str) -> Optional[dict]:
if isinstance((e := self._send_recv_task.exception()), Exception):
logger.exception(f"Websocket sending exception: {e}")
raise e
elif isinstance((e := self._send_recv_task.result()), Exception):
logger.exception(f"Websocket sending exception: {e}")
raise e
await asyncio.sleep(0.1)
return None

Expand Down
Loading