Sfoglia il codice sorgente

删除的数据未同步

denny 1 anno fa
parent
commit
21a4219388

+ 16 - 0
Tools/Flyinsono.Client.AutoTestApplication/AutoTestService.cs

@@ -17,6 +17,7 @@ namespace AutoTestApplication
         {
             try
             {
+                WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ": Start Run RunRobotFrameworkReport");
                 var maxCount = CommonConfigManager.MaxExcuteCount;
                 var curDateRecord = CommonConfigManager.Records.Find(d => d.ExcuteDate.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"));
                 if (curDateRecord?.ExcuteRecords?.Count >= maxCount)
@@ -56,10 +57,25 @@ namespace AutoTestApplication
                 {
                     Console.WriteLine(scheduledEndTime.ToString("yyyy-MM-dd HH:mm:ss") + ": " + CommonConfigManager.ExcuteCmdConfig + "Run the automated test report fail");
                 }
+                WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ": End Run RunRobotFrameworkReport");
             }
             catch (Exception ex)
             {
                 Console.WriteLine("RunRobotFrameworkReport error: " + ex.Message);
+                WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " Error: " + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 写入日志
+        /// </summary>
+        /// <param name="message"></param>
+        private void WriteLog(string message)
+        {
+            var logPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Config", "Log.txt");
+            using (StreamWriter streamWriter = new StreamWriter(logPath, true))
+            {
+                streamWriter.WriteLine(message);
             }
         }
 

+ 1 - 1
Tools/Flyinsono.DBCopy.Tool/Config/AppSetting.json

@@ -2,7 +2,7 @@
   "MigrateRule": {
     "HourValue": 14,
     "MinuteValue": 0,
-    "IntervalMinutes": 0
+    "IntervalMinutes": 2
   },
   "Database": {
     "DbName": "vCloudDb",