From 4538e612167ef0e38df78615c51b96d524f9ddd2 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Wed, 11 Sep 2024 16:08:46 -0500 Subject: [PATCH] minor change --- .../BackgroundServices/ConversationTimeoutService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.OpenAPI/BackgroundServices/ConversationTimeoutService.cs b/src/Infrastructure/BotSharp.OpenAPI/BackgroundServices/ConversationTimeoutService.cs index a409ea14..4e76dc06 100644 --- a/src/Infrastructure/BotSharp.OpenAPI/BackgroundServices/ConversationTimeoutService.cs +++ b/src/Infrastructure/BotSharp.OpenAPI/BackgroundServices/ConversationTimeoutService.cs @@ -62,7 +62,11 @@ namespace BotSharp.OpenAPI.BackgroundServices if (cleanSetting == null || !cleanSetting.Enable) return; var conversationService = scope.ServiceProvider.GetRequiredService(); - var conversationIds = await conversationService.GetIdleConversations(cleanSetting.BatchSize, cleanSetting.MessageLimit, cleanSetting.BufferHours, cleanSetting.ExcludeAgentIds); + var batchSize = cleanSetting.BatchSize; + var limit = cleanSetting.MessageLimit; + var bufferHours = cleanSetting.BufferHours; + var excludeAgentIds = cleanSetting.ExcludeAgentIds ?? new List(); + var conversationIds = await conversationService.GetIdleConversations(batchSize, limit, bufferHours, excludeAgentIds); if (!conversationIds.IsNullOrEmpty()) {