Changeset 9636 for branches/HivePerformance
- Timestamp:
- 06/17/13 13:47:00 (12 years ago)
- Location:
- branches/HivePerformance/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources/HeuristicLab.Services.Hive.DataAccess/3.3/TransactionManager.cs
r9539 r9636 21 21 22 22 using System; 23 using System.IO;24 23 using System.Transactions; 25 24 … … 38 37 n--; // probably deadlock situation, let it roll back and repeat the transaction n times 39 38 LogFactory.GetLogger(typeof(TransactionManager).Namespace).Log(string.Format("Exception occured, repeating transaction {0} more times. Details: {1}", n, e.ToString())); 40 var log = new StreamWriter(@"C:\Temp\AbortedTransactions.log", true);41 log.WriteLine(DateTime.Now + ": Transaction aborted: " + n + " (" + e.Message + ")");42 log.WriteLine(e.StackTrace);43 log.Close();44 39 if (n <= 0) throw; 45 40 } -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs
r9539 r9636 222 222 } 223 223 224 //optimizedDao.UpdateTaskAndPlugins(task); no idea why this is needed225 224 return DT.Convert.ToDto(task); 226 225 }); … … 394 393 395 394 if (slave == null) { 396 var healGroup = dao.GetResources(x => x.Name == "HEAL").FirstOrDefault();397 if (healGroup != null) {398 slaveInfo.ParentResourceId = healGroup.Id;399 }400 395 dao.AddSlave(slaveInfo); 401 396 } else { -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs
r9539 r9636 73 73 dao.UpdateSlave(slave); 74 74 }); 75 }76 75 77 if (slave != null) {78 76 // update task data 79 77 actions.AddRange(UpdateTasks(heartbeat, slave.IsAllowedToCalculate)); … … 94 92 if (availableTasks.Any()) { 95 93 var task = availableTasks.First(); 96 Assign Job(slave, task.TaskId);94 AssignTask(slave, task.TaskId); 97 95 actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateTask, task.TaskId)); 98 96 } … … 114 112 } 115 113 116 private void Assign Job(Slave slave, Guid taskId) {117 var task = dao.UpdateTaskState(taskId, DataAccess.TaskState.Transferring, slave.ResourceId, null, null);114 private void AssignTask(Slave slave, Guid taskId) { 115 var task = dao.UpdateTaskState(taskId, TaskState.Transferring, slave.ResourceId, null, null); 118 116 119 117 // from now on the task has some time to send the next heartbeat (ApplicationConstants.TransferringJobHeartbeatTimeout)
Note: See TracChangeset
for help on using the changeset viewer.