Example #1
0
 protected override void RunTask(QueuedTask queuedTask)
 {
     _log.Info($"Running task {queuedTask.Id}");
     if (queuedTask.GetType() == typeof(QueuedModuleTask))
     {
         RunModuleTask(queuedTask as QueuedModuleTask);
     }
     else
     {
         if (queuedTask.GetType() == typeof(QueuedInternalTask))
         {
             var task = (QueuedInternalTask)queuedTask;
             switch(task.TaskType)
             {
                 case InternalTaskType.PersistResults:
                     internalTaskPersistResults();
                     break;
                 case InternalTaskType.UploadResults:
                     internalTaskUploadResults();
                     break;
                 case InternalTaskType.SendHeartbeat:
                     internalTaskSendHeartbeat();
                     break;
                 default:
                 break;
             }
         }
     }
 }