Example #1
0
 /// <summary>
 /// thread chuyên load dữ liệu tĩnh khi có sự thay đổi
 /// </summary>
 private void ThreadReloadWhenChangeData()
 {
     while (true)
     {
         try
         {
             CallBack_Info _CallBack_Info = MemoryData.Dequeue_ChangeData();
             if (_CallBack_Info != null && _CallBack_Info.Table_Name != null && _CallBack_Info.Table_Name != "")
             {
                 if (_CallBack_Info.Table_Name == Table_Change.APPHEADER)
                 {
                     MemoryData.GetCacheCustomerInfo();
                 }
             }
             Thread.Sleep(1000);
         }
         catch (Exception ex)
         {
             Thread.Sleep(2000);
             Logger.Log().Error(ex.ToString());
         }
     }
 }