Exemplo n.º 1
0
 public static void Boot()
 {
     ConfigureDependencies();
     AutoMapperInitialize();
     InitSystemSwitch.Init();
     ScheduleTaskServices.RegisterTask(new TimeSendMessage(), new IntervalSchedule(TimeSpan.Parse("02:00:00"), DateTime.Now));
     ScheduleTaskServices.RegisterTask(new UserBehavior(), new IntervalSchedule(TimeSpan.Parse("00:00:10"), DateTime.Now));
     ScheduleTaskServices.RegisterTask(new OrderTimeSendMessage(), new IntervalSchedule(TimeSpan.Parse("00:00:20"), DateTime.Now));
     ScheduleTaskServices.Start();
     System.Threading.Thread t = new System.Threading.Thread(ReviceMessage);
     t.Start();
 }
Exemplo n.º 2
0
        public static void Boot()
        {
            ConfigureDependencies();
            AutoMapperInitialize();
            InitSystemSwitch.Init();
            ScheduleTaskServices.RegisterTask(new TimeSendMessage(), new IntervalSchedule(TimeSpan.Parse("02:00:00"), DateTime.Now));
            ScheduleTaskServices.RegisterTask(new UserBehavior(), new IntervalSchedule(TimeSpan.Parse("00:00:10"), DateTime.Now));
            ScheduleTaskServices.RegisterTask(new OrderTimeSendMessage(), new IntervalSchedule(TimeSpan.Parse("00:10:00"), DateTime.Now));
            SystemConsoSwitch.QTSettingList.ForEach(x =>
            {
                ScheduleTaskServices.RegisterTask(new GetQTInfo(x), new IntervalSchedule(TimeSpan.Parse(x.Timeout), DateTime.Now));
            });

            ScheduleTaskServices.RegisterTask(new OpenTicketTask(), new DailySchedule(1, new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 3, 0, 0)));
            ScheduleTaskServices.Start();
            System.Threading.Thread t = new System.Threading.Thread(ReviceMessage);
            t.Start();
            QueueLogsManager.Init();
        }