Public Access
Add past project meeting summary tools
PR and Push Build/Test / build-and-test (push) Failing after 10m56s
PR and Push Build/Test / build-and-test (push) Failing after 10m56s
This commit is contained in:
@@ -27,26 +27,7 @@ public sealed class ProcessCommandRunner : ICommandRunner
|
||||
CancellationToken cancellationToken,
|
||||
IReadOnlyDictionary<string, string>? environment = null)
|
||||
{
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
UseShellExecute = false
|
||||
};
|
||||
|
||||
foreach (var argument in arguments)
|
||||
{
|
||||
startInfo.ArgumentList.Add(argument);
|
||||
}
|
||||
|
||||
if (environment is not null)
|
||||
{
|
||||
foreach (var (key, value) in environment)
|
||||
{
|
||||
startInfo.Environment[key] = value;
|
||||
}
|
||||
}
|
||||
var startInfo = CreateStartInfo(fileName, arguments, environment);
|
||||
|
||||
logger.LogInformation("Running command {Command} {Arguments}", fileName, string.Join(' ', arguments));
|
||||
using var process = Process.Start(startInfo)
|
||||
@@ -82,6 +63,37 @@ public sealed class ProcessCommandRunner : ICommandRunner
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static ProcessStartInfo CreateStartInfo(
|
||||
string fileName,
|
||||
IReadOnlyList<string> arguments,
|
||||
IReadOnlyDictionary<string, string>? environment = null)
|
||||
{
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
};
|
||||
|
||||
foreach (var argument in arguments)
|
||||
{
|
||||
startInfo.ArgumentList.Add(argument);
|
||||
}
|
||||
|
||||
if (environment is not null)
|
||||
{
|
||||
foreach (var (key, value) in environment)
|
||||
{
|
||||
startInfo.Environment[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return startInfo;
|
||||
}
|
||||
|
||||
private static async Task<string> ReadLinesAsync(
|
||||
StreamReader reader,
|
||||
Action<string> log,
|
||||
|
||||
@@ -66,6 +66,11 @@ public sealed class PyannoteDiarizationWarmupHostedService : IHostedService
|
||||
diarization.Image,
|
||||
diarization.Model);
|
||||
await finalizer.WarmUpAsync(diarization, cancellationToken);
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogInformation(
|
||||
"Finished pyannote warm-up for image {Image} and model {Model}",
|
||||
diarization.Image,
|
||||
@@ -76,6 +81,10 @@ public sealed class PyannoteDiarizationWarmupHostedService : IHostedService
|
||||
logger.LogInformation("Pyannote warm-up was cancelled during application shutdown");
|
||||
throw;
|
||||
}
|
||||
catch (Exception) when (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.LogError(
|
||||
|
||||
Reference in New Issue
Block a user