修复S7服务轮询问题

This commit is contained in:
2025-09-15 20:54:32 +08:00
parent 4773e87886
commit 5ab18f95f0
21 changed files with 351 additions and 260 deletions

View File

@@ -50,14 +50,13 @@ public class DataProcessingService : BackgroundService, IDataProcessingService
/// 将一个变量数据项异步推入处理队列。
/// </summary>
/// <param name="data">要入队的变量数据。</param>
public async ValueTask EnqueueAsync(VariableDto data)
public async ValueTask EnqueueAsync(VariableContext context)
{
if (data == null)
if (context == null)
{
return;
}
var context = new VariableContext(data);
// 将数据项写入 Channel供后台服务处理。
await _queue.Writer.WriteAsync(context);
}