public override void RunSetUpdate(ObjectId runSetLiteDbId, ObjectId runnerLiteDbId, GingerRunner gingerRunner) { LiteDbRunner runner = new LiteDbRunner(); runner.BusinessFlowsColl.AddRange(liteDbBFList); runner._id = runnerLiteDbId; runner.Seq = 1; runner.Name = "Automated Runner"; runner.ApplicationAgentsMappingList = gingerRunner.ApplicationAgents.Select(a => a.AgentName + "_:_" + a.AppName).ToList(); runner.Environment = gingerRunner.ProjEnvironment != null ? gingerRunner.ProjEnvironment.Name : string.Empty; runner.GUID = gingerRunner.Guid; if (gingerRunner.BusinessFlows.Count > 0) { runner.StartTimeStamp = gingerRunner.BusinessFlows[0].StartTimeStamp; runner.EndTimeStamp = gingerRunner.BusinessFlows[0].EndTimeStamp; runner.Elapsed = gingerRunner.BusinessFlows[0].Elapsed; } runner.RunStatus = (liteDbBFList.Count > 0) ? liteDbBFList[0].RunStatus : eRunStatus.Automated.ToString(); SaveObjToReporsitory(runner, liteDbManager.NameInDb <LiteDbRunner>()); liteDbBFList.Clear(); LiteDbRunSet runSet = new LiteDbRunSet(); runSet._id = runSetLiteDbId; base.SetReportRunSet(ExecutionLoggerManager.RunSetReport, ""); runSet.SetReportData(ExecutionLoggerManager.RunSetReport); runSet.RunnersColl.AddRange(new List <LiteDbRunner>() { runner }); SaveObjToReporsitory(runSet, liteDbManager.NameInDb <LiteDbRunSet>()); }
public override void SetReportRunSet(RunSetReport runSetReport, string logFolder) { LiteDbRunSet runSet = new LiteDbRunSet(); base.SetReportRunSet(runSetReport, logFolder); runSet.RunnersColl.AddRange(ExecutionLoggerManager.RunSetReport.liteDbRunnerList); runSet.SetReportData(runSetReport); SaveObjToReporsitory(runSet, liteDbManager.NameInDb <LiteDbRunSet>()); ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Clear(); ClearSeq(); }
public override void SetReportRunSet(RunSetReport runSetReport, string logFolder) { LiteDbRunSet runSet = new LiteDbRunSet(); base.SetReportRunSet(runSetReport, logFolder); runSet.RunnersColl.AddRange(ExecutionLoggerManager.RunSetReport.liteDbRunnerList); runSet.SetReportData(runSetReport); SaveObjToReporsitory(runSet, liteDbManager.NameInDb <LiteDbRunSet>()); ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Clear(); if (runSetReport.LogFolder != null && System.IO.Directory.Exists(runSetReport.LogFolder)) { System.IO.Directory.Delete(runSetReport.LogFolder, true); } ClearSeq(); }
public override void SetReportRunSet(RunSetReport runSetReport, string logFolder) { LiteDbRunSet runSet = new LiteDbRunSet(); base.SetReportRunSet(runSetReport, logFolder); runSet.RunnersColl.AddRange(ExecutionLoggerManager.RunSetReport.liteDbRunnerList); SetRunSetChildCounts(runSet); runSet.SetReportData(runSetReport); ExecutionLoggerManager.RunSetReport.DataRepMethod = ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB; ExecutionLoggerManager.RunSetReport.RunSetExecutionStatus = (eRunStatus)Enum.Parse(typeof(eRunStatus), runSet.RunStatus); SaveObjToReporsitory(runSet, liteDbManager.NameInDb <LiteDbRunSet>()); ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Clear(); ClearSeq(); }