private static EtlDump GetEtlDump(string packageId, string sessionId) { var agent = SiteConfiguration.GetEtlAgent(); var logParser = agent.GetEtlLogParser(); var writer = new EtlDumpWriter(new EtlDumpSettings()); writer.Write(packageId, sessionId, logParser); var dump = writer.GetDump(); return dump; }
private static EtlDump GetDump(EtlMailSubscription subscription) { var writer = new EtlDumpWriter(new EtlDumpSettings()); foreach (var agentInfo in subscription.EtlAgents) { var query = CreateSessionQuery(subscription); var agent = EtlAgents.CreateAgent(agentInfo); var logParser = agent.GetEtlLogParser(); writer.Write(query, logParser); } var dump = writer.GetDump(); dump.Sessions.Sort(new Comparison<EtlSessionSummary>(SortSessionsDesc)); return dump; }
private static EtlDump GetDump(IEtlAgent agent, int lastSeconds, List<EtlStatus> etlStatuses, List<string> etlPackageIds) { var writer = new EtlDumpWriter(new EtlDumpSettings()); var query = new EtlSessionQuery { ToDateTime = DateTime.Now, FromDateTime = DateTime.Now.Subtract(TimeSpan.FromSeconds(lastSeconds)), }; query.EtlStatuses.AddRange(etlStatuses); query.EtlPackageIds.AddRange(etlPackageIds); var logParser = agent.GetEtlLogParser(); writer.Write(query, logParser); var dump = writer.GetDump(); dump.Sessions.Sort(new Comparison<EtlSessionSummary>(SortSessionsDesc)); return dump; }