Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Logger.EnableLogger();


            if (InstanceUtility.IsAnotherInstanceRunning())
            {
                Console.WriteLine("Exiting: Another instance is running ");
                return;
            }

            try
            {
                Logger.WriteLine("Starting AlarmQueueManager");
                InstanceUtility.CreateProcessIdFile();
                var aq = new AlarmQueueManager();
                Logger.WriteLine("Processing Alarms");
                aq.ProcessAlarms();
            }
            finally
            {
                InstanceUtility.DeleteProcessIdFile();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Logger.EnableLogger();

            if (InstanceUtility.IsAnotherInstanceRunning())
            {
                Console.WriteLine("Exiting: Another instance is running ");
                return;
            }

            try
            {
                Logger.WriteLine("Starting AlarmQueueManager");
                InstanceUtility.CreateProcessIdFile();
                var aq = new AlarmQueueManager();
                Logger.WriteLine("Processing Alarms");
                aq.ProcessAlarms();

            }
            finally
            {
                InstanceUtility.DeleteProcessIdFile();
            }
        }