mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET Purview Middleware: Improve Background Job Runner Injection (#3256)
* Clean up background job dependency injection * Fix xml documentation grammar
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Microsoft.Agents.AI.Purview;
|
||||
/// <summary>
|
||||
/// Service that runs jobs in background threads.
|
||||
/// </summary>
|
||||
internal sealed class BackgroundJobRunner
|
||||
internal sealed class BackgroundJobRunner : IBackgroundJobRunner
|
||||
{
|
||||
private readonly IChannelHandler _channelHandler;
|
||||
private readonly IPurviewClient _purviewClient;
|
||||
@@ -70,4 +70,12 @@ internal sealed class BackgroundJobRunner
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shutdown the job runners.
|
||||
/// </summary>
|
||||
public async Task ShutdownAsync()
|
||||
{
|
||||
await this._channelHandler.StopAndWaitForCompletionAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user