Exemplo n.º 1
0
        static void Main(string[] args)
        {
            logger.Info("Monitor started.");

            GetProjects();

            StartServices();

            foreach (string projectId in SystemInternalSetting.Projects.Keys)
            {
                ScheduleEngine.ScheduleHeartbeatJob(projectId);
                ScheduleEngine.ScheduleSqlJob(projectId);
            }

            // Sample report message
            MessageFactory.CreateReport("P1", "G1");

            Console.WriteLine(">>>Enter 'Exit' to exit monitor.");
            Console.Write(">");

            while (!Console.ReadLine().ToUpper().Equals("EXIT"))
            {
                Console.Write(">");
            }


            StopServices();

            logger.Info("Monitor stopped.");
        }
Exemplo n.º 2
0
        private static void Start()
        {
            logger.Info("Monitor started.");

            GetProjects();

            StartServices();

            foreach (string projectId in SystemInternalSetting.Projects.Keys)
            {
                ScheduleEngine.ScheduleHeartbeatJob(projectId);
                ScheduleEngine.ScheduleSqlJob(projectId);
            }

            // Sample report message
            MessageFactory.CreateReport("P1", "G1");
        }