Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/13 13:47:00 (12 years ago)
Author:
pfleck
Message:

#2030:
Added changes as suggested from server review by ascheibe.

Location:
branches/HivePerformance/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive.DataAccess/3.3/TransactionManager.cs

    r9539 r9636  
    2121
    2222using System;
    23 using System.IO;
    2423using System.Transactions;
    2524
     
    3837          n--; // probably deadlock situation, let it roll back and repeat the transaction n times
    3938          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();
    4439          if (n <= 0) throw;
    4540        }
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs

    r9539 r9636  
    222222        }
    223223
    224         //optimizedDao.UpdateTaskAndPlugins(task); no idea why this is needed
    225224        return DT.Convert.ToDto(task);
    226225      });
     
    394393
    395394        if (slave == null) {
    396           var healGroup = dao.GetResources(x => x.Name == "HEAL").FirstOrDefault();
    397           if (healGroup != null) {
    398             slaveInfo.ParentResourceId = healGroup.Id;
    399           }
    400395          dao.AddSlave(slaveInfo);
    401396        } else {
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs

    r9539 r9636  
    7373          dao.UpdateSlave(slave);
    7474        });
    75       }
    7675
    77       if (slave != null) {
    7876        // update task data
    7977        actions.AddRange(UpdateTasks(heartbeat, slave.IsAllowedToCalculate));
     
    9492                if (availableTasks.Any()) {
    9593                  var task = availableTasks.First();
    96                   AssignJob(slave, task.TaskId);
     94                  AssignTask(slave, task.TaskId);
    9795                  actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateTask, task.TaskId));
    9896                }
     
    114112    }
    115113
    116     private void AssignJob(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);
    118116
    119117      // 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.