This commit is contained in:
tanglong 2025-07-28 15:44:27 +08:00
parent a15af967e2
commit 02b030afc2
9 changed files with 53 additions and 51 deletions

View File

@ -84,8 +84,6 @@ namespace YD_AllHeartRates.Api.Mqtt
return _queue.Writer.WriteAsync(msg, stoppingToken).AsTask();
};
await foreach (var batch in ReadBatchesAsync(stoppingToken))
{
List<StudentDto> studentList;
List<S_Device> devices;
@ -135,6 +133,10 @@ namespace YD_AllHeartRates.Api.Mqtt
var studentMap = studentList.GroupBy(x => x.StudentNo).ToDictionary(g => g.Key, g => g.First());
await foreach (var batch in ReadBatchesAsync(stoppingToken))
{
Parallel.ForEach(batch, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount }, msg =>
{
try

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4af2ed6c7dde8915d38199959dc15eb0626ad29e")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a15af967e2dd98f88c113b78a7bd304a4d3c0593")]
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
beaa3e786d777e801e865749bc1ed887c9c8bed6062702fc86efc5e999ecbaef
22e8205ab6b5676d7d793a438db64102c980db506ddb7d0babd8c83fd38fab3a

View File

@ -1 +1 @@
5f7fb39ffdbe64b582eda15bdc00418a6579ad165c38355ff639a59366e2f9f7
9b82f68e122f7768a48d83e21fcb65980b61db40f12686a3b3daf32153b4fa35