Commit 8dbedc7b LN

bug修改

1 个父辈 286fe85c
......@@ -364,7 +364,7 @@ namespace OnlineStore.AutoCountClient
StringBuilder sbResult = new StringBuilder();
PerformanceCounter pf1 = new PerformanceCounter("Process", "Working Set - Private", process.ProcessName);
sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + ", 名称:{0} 内存:{1}M ", process.ProcessName, Math.Round(pf1.NextValue() / 1024 / 1024F, 2));
sbResult.AppendFormat(", CPU : {0} %", curtime.NextValue());
sbResult.AppendFormat(", CPU : {0} %", curtime.NextValue() / Environment.ProcessorCount);
LogUtil.info(sbResult.ToString());
}
}
......
......@@ -6,6 +6,7 @@ using log4net;
using System.Reflection;
using System.Drawing;
using System.Runtime.ExceptionServices;
using System.Collections.Concurrent;
namespace OnlineStore.Common
{
......@@ -16,7 +17,7 @@ namespace OnlineStore.Common
public delegate void ShowLog(string msg, Color color);
public static readonly ILog LOGGER = LogManager.GetLogger("RollingLogFileAppender");
public static readonly ILog rfidLog = LogManager.GetLogger("RfidLog");
public static Dictionary<int, DateTime> lastErrorLogTime = new Dictionary<int, DateTime>();
public static ConcurrentDictionary<int, DateTime> lastErrorLogTime = new ConcurrentDictionary<int, DateTime>();
public static System.Windows.Forms.RichTextBox logBox = null;
......@@ -61,6 +62,7 @@ namespace OnlineStore.Common
{
rfidLog.Debug(msg);
}
public static void error(string errorMsg, int type, int seconds = 10)
{
try
......@@ -70,14 +72,13 @@ namespace OnlineStore.Common
TimeSpan span = DateTime.Now - lastErrorLogTime[type];
if (span.TotalSeconds > seconds)
{
lastErrorLogTime.Remove(type);
lastErrorLogTime.Add(type, DateTime.Now);
lastErrorLogTime[type] = DateTime.Now;
error(LOGGER, errorMsg);
}
}
else
{
lastErrorLogTime.Add(type, DateTime.Now);
lastErrorLogTime.TryAdd(type, DateTime.Now);
error(LOGGER, errorMsg);
}
}
......
......@@ -209,6 +209,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IB22_LocationDown))
{
MoveInfo.NextMoveStep(StepEnum.IB23_ShelfOut);
MoveInfo.TimeOutSeconds = 30;
WorkLog("上料完成 :通知agv来取料串,等待料串离开");
AgvClient.NeedLeave(AgvName, CurrShelfId, ClientLevel.High);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.LOW));
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!