Hi, guys:
I built a sanic app like this:
from sanic import Sanic
from sanic.response import text
app = Sanic(__name__)
@app.route("/download-tile", methods=frozenset({"POST"}))
async def download_tile(request):
res = awati SEND_AYNC_REQUESTS(request.json["url"]) # assume it takes seconds to get the response
return text(res.body)
I found that when A
sent a request to /download-tile
, sanic will send a async request for A
.
meanwhile, B
also sent a request to /download-tile
, but A’s request is pending, sanic can’t send requset for B
.
how to make sanic send async request for A and B the same time?