Changeset 9399
- Timestamp:
- 04/26/13 17:36:48 (12 years ago)
- Location:
- branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r9397 r9399 40 40 select t 41 41 ); 42 43 public Task GetTaskByDto(DT.Task taskDto) { 44 var task = GetTaskById(taskDto.Id); 45 DT.Convert.ToEntity(taskDto, task); 46 return task; 47 } 42 48 43 49 public Tuple<Task, Guid?> GetTaskByIdAndLastStateLogSlaveId(Guid taskId) { … … 177 183 178 184 #region Plugin Methods 185 public Plugin GetPluginById(Guid pluginId) { 186 return GetPluginByIdQuery(Db, pluginId).SingleOrDefault(); 187 } 188 189 private static Func<HiveDataContext, Guid, IQueryable<Plugin>> GetPluginByIdQuery = CompiledQuery.Compile((HiveDataContext db, Guid pluginId) => 190 from p in db.Plugins 191 where p.PluginId == pluginId 192 select p 193 ); 179 194 180 195 #endregion -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs
r9397 r9399 91 91 92 92 return trans.UseTransaction(() => { 93 return dtoDao.GetTask(taskId);93 return DT.Convert.ToDto(dao.GetTaskById(taskId)); 94 94 }, false, false); 95 95 } … … 159 159 160 160 trans.UseTransaction(() => { 161 dtoDao.UpdateTaskAndPlugins(taskDto); 161 var task = dao.GetTaskByDto(taskDto); 162 dao.UpdateTask(task); 162 163 }); 163 164 } … … 167 168 author.AuthorizeForTask(task.Id, Permission.Full); 168 169 169 // what for?170 /*trans.UseTransaction(() => {171 d toDao.UpdateTaskAndPlugins(task);172 }); */170 trans.UseTransaction(() => { 171 var t = dao.GetTaskByDto(task); 172 dao.UpdateTask(t); 173 }); 173 174 174 175 trans.UseTransaction(() => { … … 474 475 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 475 476 return trans.UseTransaction(() => { 476 return dtoDao.GetPlugin(pluginId);477 return DT.Convert.ToDto(dao.GetPluginById(pluginId)); 477 478 }); 478 479 } -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Interfaces/IHiveDao.cs
r9397 r9399 30 30 #region Task Methods 31 31 Task GetTaskById(Guid task); 32 Task GetTaskByDto(DT.Task taskDto); 32 33 Tuple<Task, Guid?> GetTaskByIdAndLastStateLogSlaveId(Guid taskId); 33 34 … … 36 37 37 38 void UpdateTask(Task task); 38 void UpdateTaskAndPlugins(Task task);39 39 Task UpdateTaskState(Guid taskId, TaskState taskState, Guid? slaveId, Guid? userId, string exception); 40 40 … … 43 43 44 44 #region TaskData Methods 45 TaskData GetTaskDataByDto(DT.TaskData dto);45 TaskData GetTaskDataByDto(DT.TaskData taskDataDto); 46 46 void UpdateTaskData(TaskData taskData); 47 47 #endregion … … 60 60 61 61 #region Plugin Methods 62 62 Plugin GetPluginById(Guid pluginId); 63 63 #endregion 64 64
Note: See TracChangeset
for help on using the changeset viewer.