Esempio n. 1
0
        protected void Process()
        {
            var orchestrator = new ImportOrchestrator();

            orchestrator.SetLogger(ServiceLogger.Instance);

            Log("  - Starting process -");
            while (true)
            {
                Log("  Performing...");

                orchestrator.Process();

                Thread.Sleep(2000);

                //throw new Exception("Error!!!");

                if (!_continue)
                {
                    break;
                }
            }



            //Thread.Sleep(40000);

            Log("  - Process completed -");
        }
Esempio n. 2
0
        private void ProcessOrchestrator()
        {
            Log("  - Starting process -");

            var orchestrator = new ImportOrchestrator();

            orchestrator.SetLogger(ServiceLogger.Instance);

            while (true)
            {
                try
                {
                    //Log("  Performing...");

                    orchestrator.Process();
                }
                catch (Exception ex)
                {
                    Log("Service unexpected error: " + ex);
                }

                Thread.Sleep(2000);
                if (!_continue)
                {
                    orchestrator.RequestStop();
                    break;
                }
            }

            //Thread.Sleep(20000);
            Log("  - Process completed -");
        }