refactor: 调用 AppVeyor 接口超时时间更改为10秒

This commit is contained in:
Argo Zhang 2019-08-19 07:55:54 +08:00
parent a4c83abc7e
commit 2e3425b988
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ namespace Bootstrap.Admin.Controllers.Api
[HttpGet]
public async Task<ActionResult> Builds([FromServices]GiteeHttpClient client, [FromQuery]string userName = "ArgoZhang", [FromQuery]string projName = "bootstrapadmin", [FromQuery]string branchName = "master", [FromQuery]string label = "custom badge", [FromQuery]string color = "orange")
{
var ret = await GetJsonAsync(() => client.HttpClient.GetAsJsonAsync<AppveyorBuildResult>($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}", null, new CancellationTokenSource(2000).Token), content =>
var ret = await GetJsonAsync(() => client.HttpClient.GetAsJsonAsync<AppveyorBuildResult>($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}", null, new CancellationTokenSource(10000).Token), content =>
{
return content == null ? "unknown" : content.Build.Version;
});