public void StartWork() { Task task = Task.Factory.StartNew(() => { MsQueue <LogModel> msQueue = new MsQueue <LogModel>(AppSettings.GetValue("log_msqueue")); msQueue.ReceiveMessage(Worker); }); tasks.Add(task); }
public void StartWork() { task = Task.Factory.StartNew(() => { MsQueue <SchedulingQueueModel> msQueue = new MsQueue <SchedulingQueueModel>(AppSettings.GetValue("task_scheduling_msqueue")); msQueue.ReceiveMessage(Worker); }); var schedulings = taskScheduling.GetTaskSchedulings((int)SchedulingStateEnum.Running); scheduler.Start(); foreach (var scheduling in schedulings) { var dict = GetTriggersAndJobs(scheduling); if (dict.Count > 0) { scheduler.ScheduleJobs(dict, true); } } }