|
|
@ -244,7 +244,8 @@ public class NetworkInterfaceManager : INetworkInterfaceManager |
|
|
|
var fullCommand = $"{command} {NULL_CONFIG} {config.CoreNetworkConfig} {config.ImsConfig}"; |
|
|
|
|
|
|
|
_logger.LogInformation("并发执行次要配置启动命令: {Command}", fullCommand); |
|
|
|
secondaryTasks.Add(_commandExecutor.ExecuteCommandAsync(fullCommand, _context.TokenSource)); |
|
|
|
//new CancellationTokenSource()
|
|
|
|
secondaryTasks.Add(_commandExecutor.ExecuteCommandAsync(fullCommand, new CancellationTokenSource())); |
|
|
|
} |
|
|
|
|
|
|
|
// 等待所有次要配置命令执行完成
|
|
|
@ -263,7 +264,8 @@ public class NetworkInterfaceManager : INetworkInterfaceManager |
|
|
|
var fullCommand = $"{command} {networkConfig.RagConfig} {config.CoreNetworkConfig} {config.ImsConfig}"; |
|
|
|
|
|
|
|
_logger.LogInformation("执行单配置启动命令: {Command}", fullCommand); |
|
|
|
var result = await _commandExecutor.ExecuteCommandAsync(fullCommand, _context.TokenSource); |
|
|
|
//_context.TokenSource
|
|
|
|
var result = await _commandExecutor.ExecuteCommandAsync(fullCommand, new CancellationTokenSource()); |
|
|
|
return result.IsSuccess |
|
|
|
? NetworkInterfaceOperationResult.Success(NetworkConfigType.BothRagAndCore) |
|
|
|
: NetworkInterfaceOperationResult.Failure($"执行单配置启动命令失败: {result.Error}", NetworkConfigType.BothRagAndCore); |
|
|
@ -282,7 +284,8 @@ public class NetworkInterfaceManager : INetworkInterfaceManager |
|
|
|
var fullCommand = $"{command} NULL {config.CoreNetworkConfig} {config.ImsConfig}"; |
|
|
|
|
|
|
|
_logger.LogInformation("并发执行次要配置启动命令: {Command}", fullCommand); |
|
|
|
secondaryTasks.Add(_commandExecutor.ExecuteCommandAsync(fullCommand, _context.TokenSource)); |
|
|
|
//_context.TokenSource
|
|
|
|
secondaryTasks.Add(_commandExecutor.ExecuteCommandAsync(fullCommand, new CancellationTokenSource())); |
|
|
|
} |
|
|
|
|
|
|
|
// 等待所有次要配置命令执行完成
|
|
|
@ -300,7 +303,8 @@ public class NetworkInterfaceManager : INetworkInterfaceManager |
|
|
|
var fullCommand = $"{primaryCommand} {networkConfig.RagConfig} {primaryConfig.CoreNetworkConfig} {primaryConfig.ImsConfig}"; |
|
|
|
|
|
|
|
_logger.LogInformation("执行主配置启动命令: {Command}", fullCommand); |
|
|
|
var result = await _commandExecutor.ExecuteCommandAsync(fullCommand, _context.TokenSource); |
|
|
|
//_context.TokenSource
|
|
|
|
var result = await _commandExecutor.ExecuteCommandAsync(fullCommand, new CancellationTokenSource()); |
|
|
|
if (!result.IsSuccess) |
|
|
|
{ |
|
|
|
return NetworkInterfaceOperationResult.Failure($"主配置命令执行失败: {result.Error}", NetworkConfigType.BothRagAndCore); |
|
|
|