Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/14 17:00:14 (10 years ago)
Author:
ascheibe
Message:

#2153 merged r11082, r11113, r11117 into stable

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Manager/ConfigManager.cs

    r9456 r11121  
    117117      st.JobsFetched = SlaveStatusInfo.TasksFetched;
    118118      st.JobsFailed = SlaveStatusInfo.TasksFailed;
    119       st.ExceptionsOccured = SlaveStatusInfo.ExceptionsOccured;
    120119
    121120      st.Jobs = jobManager.GetExecutionTimes().Select(x => new TaskStatus { TaskId = x.Key, ExecutionTime = x.Value }).ToList();
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Manager/HeartbeatManager.cs

    r9456 r11121  
    2424using System.Threading;
    2525using HeuristicLab.Clients.Hive.SlaveCore.Properties;
    26 using HeuristicLab.Common;
    2726
    2827namespace HeuristicLab.Clients.Hive.SlaveCore {
     
    115114              if (msgs == null) {
    116115                SlaveClientCom.Instance.LogMessage("Error getting response from HB");
    117                 OnExceptionOccured(new Exception("Error getting response from HB"));
    118116              } else {
    119117                SlaveClientCom.Instance.LogMessage("HB Response received (" + msgs.Count + "): ");
     
    126124        catch (Exception e) {
    127125          SlaveClientCom.Instance.LogMessage("Heartbeat thread failed: " + e.ToString());
    128           OnExceptionOccured(e);
    129126        }
    130127        waitHandle.WaitOne(this.interval);
     
    132129      SlaveClientCom.Instance.LogMessage("Heartbeat thread stopped");
    133130    }
    134 
    135     #region Eventhandler
    136     public event EventHandler<EventArgs<Exception>> ExceptionOccured;
    137     private void OnExceptionOccured(Exception e) {
    138       var handler = ExceptionOccured;
    139       if (handler != null) handler(this, new EventArgs<Exception>(e));
    140     }
    141     #endregion
    142131  }
    143132}
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Manager/TaskManager.cs

    r9456 r11121  
    7171      try {
    7272        if (slaveTasks.ContainsKey(task.Id)) {
    73           SlaveStatusInfo.IncrementExceptionOccured();
     73          SlaveStatusInfo.IncrementTasksFailed();
    7474          throw new TaskAlreadyRunningException(task.Id);
    7575        } else {
     
    185185      slaveTask.TaskStopped += new EventHandler<EventArgs<Guid>>(slaveTask_TaskStopped);
    186186      slaveTask.TaskFailed += new EventHandler<EventArgs<Guid, Exception>>(slaveTask_TaskFailed);
    187       slaveTask.ExceptionOccured += new EventHandler<EventArgs<Guid, Exception>>(slaveTask_ExceptionOccured);
    188187    }
    189188
     
    193192      slaveTask.TaskStopped -= new EventHandler<EventArgs<Guid>>(slaveTask_TaskStopped);
    194193      slaveTask.TaskFailed -= new EventHandler<EventArgs<Guid, Exception>>(slaveTask_TaskFailed);
    195       slaveTask.ExceptionOccured -= new EventHandler<EventArgs<Guid, Exception>>(slaveTask_ExceptionOccured);
    196194    }
    197195
     
    220218      try {
    221219        taskData = slaveTask.GetTaskData();
    222         if (taskData == null) throw new SerializationException();
    223220        SlaveStatusInfo.IncrementTasksFinished();
    224221        OnTaskPaused(slaveTask, taskData);
     
    243240      try {
    244241        taskData = slaveTask.GetTaskData();
    245         if (taskData == null) throw new SerializationException();
    246242        SlaveStatusInfo.IncrementTasksFinished();
    247243        OnTaskStopped(slaveTask, taskData);
     
    266262      try {
    267263        taskData = slaveTask.GetTaskData();
    268         if (taskData == null) throw new SerializationException();
    269264      }
    270265      catch { /* taskData will be null */ }
    271266      SlaveStatusInfo.IncrementTasksFailed();
    272267      OnTaskFailed(slaveTask, taskData, e.Value2);
    273     }
    274 
    275     private void slaveTask_ExceptionOccured(object sender, EventArgs<Guid, Exception> e) {
    276       SlaveTask slaveTask;
    277       slaveTasksLocker.EnterUpgradeableReadLock();
    278       try {
    279         slaveTask = slaveTasks[e.Value];
    280         RemoveSlaveTask(e.Value, slaveTask);
    281       }
    282       finally { slaveTasksLocker.ExitUpgradeableReadLock(); }
    283 
    284       SlaveStatusInfo.IncrementExceptionOccured();
    285       OnExceptionOccured(slaveTask, e.Value2);
    286268    }
    287269    #endregion
     
    312294    }
    313295
    314     public event EventHandler<EventArgs<SlaveTask, Exception>> ExceptionOccured;
    315     private void OnExceptionOccured(SlaveTask slaveTask, Exception exception) {
    316       var handler = ExceptionOccured;
    317       if (handler != null) handler(this, new EventArgs<SlaveTask, Exception>(slaveTask, exception));
    318     }
    319 
    320296    public event EventHandler<EventArgs<SlaveTask>> TaskAborted;
    321297    private void OnTaskAborted(SlaveTask slaveTask) {
Note: See TracChangeset for help on using the changeset viewer.