Ejemplo n.º 1
0
        protected override void OnStart(string[] args)
        {
            logger     = LogManager.GetCurrentClassLogger();
            components = new System.ComponentModel.Container();

            logger.Trace("Starting..." + DateTime.Now.ToString());
            sitClientManager           = new SitClientManager();
            serverConfigurationManager = new ServerConfigurationManager();

            logger.Trace("Checking entities in DB");
            sitClientManager.checkClientsEntities();
            sitClientManager.checkClientsHistoryEntities();
            serverConfigurationManager.checkConfigurationsEntities();

            logger.Trace("Resetting Ping Pending statuses");
            sitClientManager.UpdateResetPingPending();

            logger.Trace("Scheduling sitClientWatchDog execution");
            System.Threading.Thread myThread = new System.Threading.Thread(new System.Threading.ThreadStart(sitClientManager.sitClientWatchDog));
            myThread.Start();
        }