Skip to content

Commit ebaeb93

Browse files
committed
Fix local benchmarking
1 parent bab3618 commit ebaeb93

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

benchmarks/local/zero/zmq__gateway_sanic.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from sanic.response import json, text
55

66
from zero import AsyncZeroClient, ZeroClient
7-
from zero.protocols.tcp import AsyncTCPClient
87

98
# TODO: why we can't use uvloop?
109
try:
@@ -19,7 +18,7 @@
1918
app = Sanic(__name__)
2019

2120
client = ZeroClient("server", 5559)
22-
async_client = AsyncZeroClient("server", 5559, protocol=AsyncTCPClient)
21+
async_client = AsyncZeroClient("server", 5559)
2322

2423

2524
@app.route("/hello")
@@ -30,7 +29,7 @@ async def hello(request):
3029

3130
@app.route("/async_hello")
3231
async def async_hello(request):
33-
resp = await async_client.call("hello_world", None)
32+
resp = await async_client.call("async_hello_world", None)
3433
return text(resp)
3534

3635

@@ -43,7 +42,7 @@ async def order(request):
4342
@app.route("/async_order")
4443
async def async_order(request):
4544
resp = await async_client.call(
46-
"save_order", {"user_id": "1", "items": ["apple", "python"]}
45+
"async_save_order", {"user_id": "1", "items": ["apple", "python"]}
4746
)
4847
return json(resp)
4948

0 commit comments

Comments
 (0)