Skip to content

Commit

Permalink
优化服务状态刷新
Browse files Browse the repository at this point in the history
  • Loading branch information
li-zheng-hao committed Nov 17, 2023
1 parent 9adb06b commit b6e84cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions LightDeployApp/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private void SelectDirClick(object sender, RoutedEventArgs e)

}

private async void SelectionServiceChanged(object sender, SelectionChangedEventArgs e)
private void SelectionServiceChanged(object sender, SelectionChangedEventArgs e)
{
if (Service.SelectedValue == null) return;
var selectService=AppContext.GetAppDataContext().Services.FirstOrDefault(it => it.Name == Service.SelectedValue.ToString());
Expand Down Expand Up @@ -194,7 +194,7 @@ private async void SelectionServiceChanged(object sender, SelectionChangedEventA


AppContext.GetAppDataContext().DeployHistories = histories;
await DeployService.RefreshSelectEnvironmentsStatus(selectService.Name);
Task.Run(()=>DeployService.RefreshSelectEnvironmentsStatus(selectService.Name));

}

Expand Down
3 changes: 1 addition & 2 deletions LightDeployApp/Services/DeployService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,7 @@ public static async Task RefreshSelectEnvironmentsStatus(string serviceName)
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
AppContext.Log($"{environment.Host}】获取服务状态失败: "+e.Message);
}

}
Expand Down

0 comments on commit b6e84cd

Please sign in to comment.