Changeset 4423 for branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
- Timestamp:
- 09/17/10 10:26:55 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
r4368 r4423 62 62 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 63 63 public ResponseHeartBeat ProcessHeartBeat(HeartBeatData hbData) { 64 using (contextFactory.GetContext( )) {64 using (contextFactory.GetContext(false)) { // due to concurrency issues with lifecycle-heartbeat do the transaction inside 65 65 return slaveCommunicator.ProcessHeartBeat(hbData); 66 66 } … … 77 77 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 78 78 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 79 public ResponseResultReceived StoreFinishedJobResult(Guid slaveId, Guid jobId, byte[] result, double percentage, string exception) {80 using (contextFactory.GetContext()) { 81 ServiceLocator.GetAuthorizationManager().Authorize ForJobs(jobId);82 return slaveCommunicator.StoreFinishedJobResult(slaveId, jobId, result, percentage, exception);79 public ResponseResultReceived StoreFinishedJobResult(Guid slaveId, Guid jobId, byte[] result, TimeSpan executionTime, string exception) { 80 using (contextFactory.GetContext()) { 81 ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId); 82 return slaveCommunicator.StoreFinishedJobResult(slaveId, jobId, result, executionTime, exception); 83 83 } 84 84 } … … 108 108 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 109 109 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 110 public ResponseResultReceived ProcessSnapshot(Guid slaveId, Guid jobId, byte[] result, double percentage, string exception) {111 using (contextFactory.GetContext()) { 112 ServiceLocator.GetAuthorizationManager().Authorize ForJobs(jobId);113 return slaveCommunicator.ProcessSnapshot(slaveId, jobId, result, percentage, exception);110 public ResponseResultReceived ProcessSnapshot(Guid slaveId, Guid jobId, byte[] result, TimeSpan executionTime, string exception) { 111 using (contextFactory.GetContext()) { 112 ServiceLocator.GetAuthorizationManager().AuthorizeJobs(jobId); 113 return slaveCommunicator.ProcessSnapshot(slaveId, jobId, result, executionTime, exception); 114 114 } 115 115 } … … 136 136 using (contextFactory.GetContext()) { 137 137 return jobManager.AddChildJob(parentJobId, serializedJob); 138 139 138 } 140 139 } … … 149 148 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 150 149 public Stream GetStreamedJob(Guid slaveId) { 150 ServiceLocator.GetLifecycleManager().JobsCurrentlyTransferring++; 151 151 using (contextFactory.GetContext(false)) { 152 152 ResponseObject<JobDto> job = null; … … 170 170 stream.Dispose(); 171 171 } 172 ServiceLocator.GetLifecycleManager().JobsCurrentlyTransferring--; 172 173 }); 173 174 … … 221 222 } 222 223 } 224 225 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 226 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 227 public Response DeleteChildJobs(Guid jobId) { 228 using (contextFactory.GetContext()) { 229 return jobManager.DeleteChildJobs(jobId); 230 } 231 } 232 223 233 #endregion 224 234 }
Note: See TracChangeset
for help on using the changeset viewer.