我正在使用 Python Asyncio 来执行大量 HTTP 请求。
我想知道 Asyncio 的默认并发级别是多少,或者在任何给定时间会并行发生多少个 HTTP 请求?
我用来执行 HTTP 请求的代码如下:
async def call_url(self, session, url):
response = await session.request(method='GET', url=url)
return response
async def main(self, url_list):
async with aiohttp.ClientSession() as session:
res = await asyncio.gather(*[self.call_url(session, url) for url in url_list])
return res
Run Code Online (Sandbox Code Playgroud) 我在组织内的 Microsoft Azure 存储库上托管了一个 git 存储库。
我希望能够自动从 Azure 外部托管的服务中“git pull”代码。
该文档仅提到使用个人访问令牌或私有 SSH 密钥进行 git 身份验证。
我不想使用个人访问令牌,因为该服务的其他开发人员可以访问它。
是否可以使用服务主体从 Azure 存储库中提取代码?