Esempio n. 1
0
        private void Processor(List <CurrencyInfo> items)
        {
            ServerInstrumentation.Current.Queue(1);

            int n = Environment.TickCount;

            count += items.Count;

            if (items.Count != 0)
            {
                try
                {
                    _service.BatchSave_Info(items);

                    ServerInstrumentation.Current.Process(items.Count);
                }
                catch (Exception ex)
                {
                    ElibExceptionHandler.Handle(ex);
                    ServerInstrumentation.Current.Fault(items.Count);
                    BackUp(items);
                    throw;
                }

                logger.Info(string.Format("Task({0}):\tCurrent:{1}\tAll:{2}\tcost:{3}ms",
                                          index, items.Count, count, Environment.TickCount - n));
            }



            //if (MAX_TIMEOUT > 0)
            //{
            //    Thread.Sleep(MAX_TIMEOUT);
            //}
        }
Esempio n. 2
0
 static void DataReceived(ServerConnection sender, DataEventArgs e)
 {
     try
     {
         HandleDataReceived(sender, e);
     }
     catch (Exception ex)
     {
         ElibExceptionHandler.Handle(ex as Exception);
     }
 }
Esempio n. 3
0
 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     ElibExceptionHandler.Handle(e.ExceptionObject as Exception);
 }
Esempio n. 4
0
        void Application_Error(object sender, EventArgs e)
        {
            var ex = HttpContext.Current.Error.InnerException ?? HttpContext.Current.Error;

            ElibExceptionHandler.Handle(ex);
        }