Skip to content

Commit

Permalink
Merge pull request #62 from backend-developers-ltd/interface-v0-1
Browse files Browse the repository at this point in the history
Update iterface version to v0.1
  • Loading branch information
mzukowski-reef authored Apr 2, 2024
2 parents 944d39e + bcbbc02 commit 0951e41
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, loop: asyncio.AbstractEventLoop, miner_address: str, token: s
self.full_payload_lock = asyncio.Lock()

def miner_url(self) -> str:
return f'{self.miner_address}/v0/executor_interface/{self.token}'
return f'{self.miner_address}/v0.1/executor_interface/{self.token}'

def accepted_request_type(self) -> type[BaseRequest]:
return BaseMinerRequest
Expand Down
4 changes: 2 additions & 2 deletions miner/app/src/compute_horde_miner/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
re_path(r'.*', get_asgi_application()),
]),
'websocket': URLRouter([
path('v0/validator_interface/<str:validator_key>', MinerValidatorConsumer.as_asgi()),
path('v0/executor_interface/<str:executor_token>', MinerExecutorConsumer.as_asgi()),
path('v0.1/validator_interface/<str:validator_key>', MinerValidatorConsumer.as_asgi()),
path('v0.1/executor_interface/<str:executor_token>', MinerExecutorConsumer.as_asgi()),
]),
})

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


async def fake_executor(token):
communicator = WebsocketCommunicator(asgi.application, f"v0/executor_interface/{token}")
communicator = WebsocketCommunicator(asgi.application, f"v0.1/executor_interface/{token}")
connected, _ = await communicator.connect()
assert connected
response = await communicator.receive_json_from(timeout=WEBSOCKET_TIMEOUT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async def test_main_loop():

job_uuid = str(uuid.uuid4())
fake_executor.job_uuid = job_uuid
communicator = WebsocketCommunicator(asgi.application, f"v0/validator_interface/{validator_key}")
communicator = WebsocketCommunicator(asgi.application, f"v0.1/validator_interface/{validator_key}")
connected, _ = await communicator.connect()
assert connected
await communicator.send_json_to({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def test_echo_image(self):
zip_contents = in_memory_output.read()
base64_zipfile = base64.b64encode(zip_contents).decode()

async with websockets.connect(f'ws://localhost:8045/v0/validator_interface/{validator_key}') as ws:
async with websockets.connect(f'ws://localhost:8045/v0.1/validator_interface/{validator_key}') as ws:
await ws.send(json.dumps({
"message_type": "V0AuthenticateRequest",
"payload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, loop: asyncio.AbstractEventLoop, miner_address: str, my_hotke
self.miner_finished_or_failed_timestamp: int = 0

def miner_url(self) -> str:
return f'ws://{self.miner_address}:{self.miner_port}/v0/validator_interface/{self.my_hotkey}'
return f'ws://{self.miner_address}:{self.miner_port}/v0.1/validator_interface/{self.my_hotkey}'

def accepted_request_type(self) -> type[BaseRequest]:
return BaseMinerRequest
Expand Down

0 comments on commit 0951e41

Please sign in to comment.