代码调整

main
xiaoguo 2 years ago
parent 657d21133b
commit 57654071fa

Binary file not shown.

@ -71,7 +71,7 @@ namespace PVDEMCS.Devices.Impl
/// </summary>
public bool IsRun
{
get { return IsRun; }
get { return isRun; }
}
/// <summary>

@ -84,22 +84,31 @@ namespace PVDEMCS.Devices.Impl
{
foreach (var item in monitors)
{
var task = item.StartAsync();
var task = item.StopAsync();
}
}
private void TaskRun()
{
Task.Run(() =>
Task.Run(() =>
{
while (true)
{
lock (lockObj)
foreach (var item in monitors)
{
RunEquipmentRecord();
Thread.Sleep(1000);
var task = item.StopAsync();
}
Thread.Sleep(5000);
}
});
Task.Run(() =>
{
while (true)
{
RunEquipmentRecord();
Thread.Sleep(1000);
}
});
@ -108,12 +117,9 @@ namespace PVDEMCS.Devices.Impl
{
while (true)
{
lock (lockObj1)
{
RunEquipmentRecordTotal();
RunEquipmentRecordTotal();
Thread.Sleep(1000 * 60);
}
Thread.Sleep(1000 * 60);
}
});
}

@ -7,6 +7,13 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Common\Configuration\**" />
<Content Remove="Common\Configuration\**" />
<EmbeddedResource Remove="Common\Configuration\**" />
<None Remove="Common\Configuration\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="7.1.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
@ -26,8 +33,4 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Common\Configuration\" />
</ItemGroup>
</Project>

Loading…
Cancel
Save