Пример #1
0
 private Exception TryCreateAgent(EtlAgentInfo agentInfo, out IEtlAgent agent)
 {
     try
     {
         agent = EtlAgents.CreateAgent(agentInfo);
         return(null);
     }
     catch (Exception exc)
     {
         agent = null;
         return(exc);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        public static IEtlAgent GetEtlAgent()
        {
            if (etlAgent == null)
            {
                if (SiteConfiguration.EtlAgents.Length == 0)
                {
                    return(new RapidSoft.Etl.Monitor.Agents.MultiEtlAgent(new IEtlAgent[0]));
                }

                var agents =
                    from a in SiteConfiguration.EtlAgents
                    select RapidSoft.Etl.Runtime.Agents.EtlAgents.CreateAgent(
                        new EtlAgentInfo()
                {
                    ConnectionString = a.ConnectionString,
                    EtlAgentType     = a.EtlAgentType,
                    SchemaName       = a.SchemaName,
                });

                etlAgent = new RapidSoft.Etl.Monitor.Agents.MultiEtlAgent(agents.ToArray());
            }

            return(etlAgent);
        }
        public static IEtlAgent GetEtlAgent()
        {
            if (etlAgent == null)
            {
                if (SiteConfiguration.EtlAgents.Length == 0)
                    return new RapidSoft.Etl.Monitor.Agents.MultiEtlAgent(new IEtlAgent[0]);

                var agents =
                    from a in SiteConfiguration.EtlAgents
                    select RapidSoft.Etl.Runtime.Agents.EtlAgents.CreateAgent(
                        new EtlAgentInfo()
                        {
                            ConnectionString = a.ConnectionString,
                            EtlAgentType = a.EtlAgentType,
                            SchemaName = a.SchemaName,
                        });

                etlAgent = new RapidSoft.Etl.Monitor.Agents.MultiEtlAgent(agents.ToArray());
            }

            return etlAgent;
        }
Пример #5
0
 public MultiEtlAgent(IEtlAgent etlAgent0, IEtlAgent etlAgent1, IEtlAgent etlAgent2, IEtlAgent etlAgent3)
     : this(new[] { etlAgent0, etlAgent1, etlAgent2, etlAgent3 })
 {
 }
Пример #6
0
 public MultiEtlAgent(IEtlAgent etlAgent0, IEtlAgent etlAgent1)
     : this(new[] { etlAgent0, etlAgent1 })
 {
 }
Пример #7
0
 public MultiEtlAgent(IEtlAgent etlAgent)
     : this(new[] { etlAgent })
 {
 }
 public _LogParser(IEtlAgent[] etlAgents)
 {
     _etlAgents = etlAgents ?? new IEtlAgent[0];
 }
 public MultiEtlAgent(IEtlAgent[] etlAgents)
 {
     _etlAgents = etlAgents ?? new IEtlAgent[0];
     _logParser = new _LogParser(_etlAgents);
 }
 public MultiEtlAgent(IEtlAgent etlAgent0, IEtlAgent etlAgent1, IEtlAgent etlAgent2, IEtlAgent etlAgent3)
     : this(new[] { etlAgent0, etlAgent1, etlAgent2, etlAgent3 })
 {
 }
 public MultiEtlAgent(IEtlAgent etlAgent0, IEtlAgent etlAgent1)
     : this(new[] { etlAgent0, etlAgent1 })
 {
 }
 public MultiEtlAgent(IEtlAgent etlAgent)
     : this(new[] { etlAgent })
 {
 }
 private Exception TryCreateAgent(EtlAgentInfo agentInfo, out IEtlAgent agent)
 {
     try
     {
         agent = EtlAgents.CreateAgent(agentInfo);
         return null;
     }
     catch (Exception exc)
     {
         agent = null;
         return exc;
     }
 }
        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;
        }