Changeset 6369
- Timestamp:
- 06/06/11 17:49:27 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Appointment.cs
r5614 r6369 38 38 [DataMember] 39 39 public Guid ResourceId { get; set; } 40 41 42 40 } 43 41 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveExperimentPermission.cs
r5614 r6369 37 37 38 38 public HiveExperimentPermission() { } 39 40 41 39 } 42 40 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveItem.cs
r6367 r6369 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Runtime.Serialization; 3 24 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/JobData.cs
r5614 r6369 35 35 36 36 public JobData() { } 37 38 37 } 39 38 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj
r6229 r6369 129 129 <None Include="HeuristicLab.snk" /> 130 130 </ItemGroup> 131 <ItemGroup> 132 <Folder Include="obj\" /> 133 </ItemGroup> 131 <ItemGroup /> 134 132 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 135 133 <PropertyGroup> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HeuristicLab.Services.Hive.DataAccess-3.4.csproj
r5852 r6369 71 71 </PropertyGroup> 72 72 <ItemGroup> 73 <Reference Include="HeuristicLab.Clients.Common-3.3">74 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>75 </Reference>76 73 <Reference Include="HeuristicLab.Common-3.3"> 77 74 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> … … 118 115 <DependentUpon>Settings.settings</DependentUpon> 119 116 </Compile> 120 <Compile Include="Tools\CreateHiveDatabaseApplication.cs" />121 117 <Compile Include="TransactionManager.cs" /> 122 118 </ItemGroup> … … 151 147 </ItemGroup> 152 148 <ItemGroup> 153 <Content Include="Tools\cleanHiveDatabase.sql" />154 149 <Content Include="Tools\prepareHiveDatabase.sql" /> 155 150 </ItemGroup> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HeuristicLabServicesHiveDataAccessPlugin.cs.frame
r6033 r6369 8 8 [Plugin("HeuristicLab.Services.Hive.DataAccess", "3.4.0.$WCREV$")] 9 9 [PluginFile("HeuristicLab.Services.Hive.DataAccess-3.4.dll", PluginFileType.Assembly)] 10 [PluginDependency("HeuristicLab.Clients.Common", "3.3")]11 10 [PluginDependency("HeuristicLab.Common", "3.3")] 12 11 [PluginDependency("HeuristicLab.Core", "3.3")] -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r6367 r6369 152 152 153 153 #region JobData Methods 154 155 154 public DT.JobData GetJobData(Guid id) { 156 155 using (var db = CreateContext()) { … … 193 192 194 193 #region StateLog Methods 195 196 194 public DT.StateLog GetStateLog(Guid id) { 197 195 using (var db = CreateContext()) { … … 285 283 286 284 #region HiveExperimentPermission Methods 287 288 285 public DT.HiveExperimentPermission GetHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId) { 289 286 using (var db = CreateContext()) { … … 322 319 } 323 320 } 324 325 321 #endregion 326 322 … … 366 362 367 363 #region PluginData Methods 368 369 364 public DT.PluginData GetPluginData(Guid id) { 370 365 using (var db = CreateContext()) { … … 399 394 public void DeletePluginData(Guid id) { 400 395 using (var db = CreateContext()) { 401 var entity = db.PluginDatas.FirstOrDefault(x => x.PluginDataId == id); // todo: check if all the byte[] is loaded into memory here. otherwise work around to delete without loading it396 var entity = db.PluginDatas.FirstOrDefault(x => x.PluginDataId == id); 402 397 if (entity != null) db.PluginDatas.DeleteOnSubmit(entity); 403 398 db.SubmitChanges(); … … 611 606 } 612 607 } 613 614 608 #endregion 615 609 … … 682 676 using (var db = CreateContext()) { 683 677 return Convert.ToDto(db.Statistics.SingleOrDefault(x => x.StatisticsId == id)); 684 685 678 } 686 679 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive-3.4.Tests.csproj
r6362 r6369 125 125 <Name>HeuristicLab.Clients.Hive.Slave-3.4</Name> 126 126 </ProjectReference> 127 <ProjectReference Include="..\HeuristicLab.Clients.Hive\3.4\HeuristicLab.Clients.Hive-3.4.csproj"> 128 <Project>{B5EF1E5A-9F3D-40B9-B4B0-30AADF2E2CEB}</Project> 129 <Name>HeuristicLab.Clients.Hive-3.4</Name> 130 </ProjectReference> 127 131 <ProjectReference Include="..\HeuristicLab.Hive\3.4\HeuristicLab.Hive-3.4.csproj"> 128 132 <Project>{F98A1740-9AC9-4D36-A582-6A2D0D06978D}</Project> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs
r6357 r6369 105 105 job.HiveExperimentId = experiment.Id; 106 106 job.Id = service.AddJob(job, jobData, new List<Guid> { slave.Id }); 107 107 108 108 // test job 109 109 DT.Job jobLoaded = service.GetJob(job.Id); … … 153 153 Assert.AreEqual(1, jobsBySlave.Count()); 154 154 Assert.AreEqual(job.Id, jobsBySlave.Single().Id); 155 155 156 156 // set it to finished 157 157 service.UpdateJobState(jobLoaded.Id, JobState.Finished, slave.Id, null, null); 158 158 159 // test if the job is returned for the resource 159 // test if the job is returned for the resource (it should not be) 160 160 var jobsBySlave2 = service.GetJobsByResourceId(slave.Id); 161 161 Assert.AreEqual(0, jobsBySlave2.Count()); 162 163 // set job waiting again 164 service.UpdateJobState(job.Id, JobState.Waiting, null, null, string.Empty); 165 166 // get job again 167 actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() }); 168 Assert.AreEqual(1, actions.Count); 169 Assert.AreEqual(MessageContainer.MessageType.CalculateJob, actions[0].Message); 170 Assert.AreEqual(job.Id, actions[0].JobId); 171 172 // create appointment which should make slave unavailable for calculation 173 Guid appointmentId = service.AddAppointment(new Appointment { ResourceId = slave.Id, StartDate = DateTime.Now - TimeSpan.FromMinutes(1), EndDate = DateTime.Now + TimeSpan.FromMinutes(1), Recurring = false }); 174 175 progress.Clear(); 176 progress.Add(job.Id, new TimeSpan(1, 5, 10, 20, 30)); 177 actions = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, AssignJob = true, FreeCores = 4, FreeMemory = 1024, JobProgress = new Dictionary<Guid, TimeSpan>() }); 178 Assert.AreEqual(1, actions.Count); 179 Assert.AreEqual(MessageContainer.MessageType.PauseAll, actions[0].Message); 180 Assert.AreEqual(Guid.Empty, actions[0].JobId); 181 182 service.DeleteAppointment(appointmentId); 162 183 163 184 // delete … … 177 198 } 178 199 179 List<DT.Job> jobs = new List<DT.Job>();180 181 200 [TestMethod] 182 201 public void TestParentJobs() { … … 282 301 service.DeleteSlave(slave.Id); 283 302 } 284 285 //[TestMethod]286 //public void TestHeartbeats() {287 // var service = GetLocalService();288 // // check if group already exists and delete289 // var existingSlaveGroup = service.GetSlaveGroups().SingleOrDefault(g => g.Name == "TestGroup");290 // if (existingSlaveGroup != null) {291 // var slavesToDelete = service.GetSlaves().Where(s => s.ParentResourceId == existingSlaveGroup.Id);292 // foreach (var slave in slavesToDelete) service.DeleteSlave(slave.Id);293 // service.DeleteSlaveGroup(existingSlaveGroup.Id);294 // }295 296 // Guid groupId = service.AddSlaveGroup(new SlaveGroup() { Name = "TestGroup", Description = "Used for unit tests" });297 298 // // create slaves299 // var slaves = new List<DT.Slave>();300 // for (int i = 0; i < 1; i++) {301 // DT.Slave slave = new DT.Slave() {302 // Cores = 2,303 // Memory = 4096,304 // Name = "Slave " + i,305 // IsAllowedToCalculate = true,306 // SlaveState = DT.SlaveState.Idle,307 // CpuSpeed = 2800,308 // FreeCores = 2,309 // FreeMemory = 3000310 // };311 // // check if slave with this name already exists and delete312 // var existingSlave = service.GetSlaves().Where(s => s.Name == slave.Name).SingleOrDefault();313 // if (existingSlave != null) service.DeleteSlave(existingSlave.Id);314 315 // slave.Id = service.AddSlave(slave);316 // service.AddResourceToGroup(groupId, slave.Id);317 // slaves.Add(slave);318 // }319 320 // // create jobs with different group, they should not be assigned321 // existingSlaveGroup = service.GetSlaveGroups().SingleOrDefault(g => g.Name == "DummyGroup");322 // if (existingSlaveGroup != null) service.DeleteSlaveGroup(existingSlaveGroup.Id);323 324 // Guid dummyGroupId = service.AddSlaveGroup(new SlaveGroup() { Name = "DummyGroup", Description = "Used for unit tests; jobs from this group shall not be calculated" });325 // // create dummy jobs326 // var dummyJobs = new List<Job>();327 // for (int i = 0; i < 2; i++) {328 // Job job = new Job() {329 // CoresNeeded = 1, MemoryNeeded = 0330 // };331 // JobData jobData = new JobData() { Data = PersistenceUtil.Serialize(new MockJob(500, false)) };332 // job.Id = service.AddJob(job, jobData, new List<Guid> { dummyGroupId });333 // dummyJobs.Add(job);334 // }335 336 // // create jobs337 // for (int i = 0; i < 2; i++) {338 // Job job = new Job() {339 // CoresNeeded = 1, MemoryNeeded = 0340 // };341 // JobData jobData = new JobData() { Data = PersistenceUtil.Serialize(new MockJob(500, false)) };342 // job.Id = service.AddJob(job, jobData, new List<Guid> { groupId });343 // jobs.Add(job);344 // }345 346 // // send heartbeats347 // foreach (var slave in slaves) {348 // new Thread(new ParameterizedThreadStart(RunSlaveThread)).Start(slave);349 // }350 351 // IEnumerable<LightweightJob> lightweightJobs;352 // do {353 // Thread.Sleep(500);354 // lightweightJobs = service.GetLightweightJobs(jobs.Select(x => x.Id));355 // } while (!lightweightJobs.All(x => x.State == JobState.Finished));356 357 // // delete slaves358 // foreach (var slave in slaves) {359 // service.DeleteSlave(slave.Id);360 // Assert.AreEqual(null, service.GetSlave(slave.Id));361 // }362 363 // // delete groups364 // service.DeleteSlaveGroup(groupId);365 // service.DeleteSlaveGroup(dummyGroupId);366 367 // // delete jobs368 // foreach (var job in jobs) {369 // service.DeleteJob(job.Id);370 // }371 372 // // delete dummy jobs373 // foreach (var job in dummyJobs) {374 // service.DeleteJob(job.Id);375 // }376 //}377 378 //public void RunSlaveThread(object slaveobj) {379 // try {380 // var service = GetLocalService();381 // Slave slave = (Slave)slaveobj;382 // int freeCores = slave.Cores.Value;383 384 // for (int i = 0; i < 10; i++) {385 386 // var messages = service.Heartbeat(new Heartbeat() { SlaveId = slave.Id, FreeMemory = 2423, FreeCores = freeCores, JobProgress = new Dictionary<Guid, TimeSpan>() });387 // if (messages.Count == 0) {388 // Debug.WriteLine("No job available");389 // return; // no more jobs390 // }391 392 // Debug.WriteLine("Messages: {0}", string.Join(", ", messages.Select(m => m.Message)));393 394 // Assert.IsTrue(messages.Where(x => x.Message == MessageContainer.MessageType.AbortJob).Count() == 0);395 // Assert.IsTrue(messages.Where(x => x.Message == MessageContainer.MessageType.SayHello).Count() == 0);396 // Assert.IsTrue(messages.Where(x => x.Message == MessageContainer.MessageType.PauseJob).Count() == 0);397 398 // var calculateJobMessage = messages.Where(x => x.Message == MessageContainer.MessageType.CalculateJob).SingleOrDefault();399 // if (calculateJobMessage != null) {400 // if (!jobs.Select(j => j.Id).Contains(calculateJobMessage.JobId))401 // Assert.Fail("Got job which was not assigned to the slavegroup");402 403 // Debug.WriteLine("Job available, calculating");404 // Job job = service.GetJob(calculateJobMessage.JobId);405 406 // JobData jobData = service.GetJobData(job.Id);407 // IJob deserializedJob = PersistenceUtil.Deserialize<IJob>(jobData.Data);408 // deserializedJob.Start();409 // job.SetState(JobState.Finished);410 // jobs.Where(x => x.Id == job.Id).Single().SetState(JobState.Finished);411 // jobData.Data = PersistenceUtil.Serialize(deserializedJob);412 // service.UpdateJobData(job, jobData);413 // Debug.WriteLine("finished calculating");414 // }415 // }416 // }417 // catch (Exception e) {418 // Assert.Fail(e.Message, e);419 // }420 //}421 303 } 422 304 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web/Hive-3.4/Web.config
r6178 r6369 31 31 <bindings> 32 32 <wsHttpBinding> 33 34 33 <binding name="WSHttpBinding_IHiveService" 35 34 receiveTimeout="00:10:00" … … 76 75 77 76 <system.webServer> 78 <!--<modules runAllManagedModulesForAllRequests="true"> 79 <add name="HiveServerModule" type="HeuristicLab.Services.Hive.IISModules.HiveServerModule"/> 80 </modules>--> 81 <directoryBrowse enabled="true"/> 82 77 <directoryBrowse enabled="true"/> 83 78 </system.webServer> 84 79 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/AuthorizationManager.cs
r5511 r6369 34 34 } 35 35 36 //public void AuthorizeJobs(params Guid[] jobIds) {37 // if (!IsAuthorizedForJobs(jobIds)) {38 // throw new SecurityException("User '" + Identity.UserName + "' is not authorized to access job (Id: " + string.Join(", ", jobIds.Select(x => x.ToString()).ToArray()) + ")");39 // }40 //}41 42 //private bool IsAuthorizedForJobs(params Guid[] jobIds) {43 // return ServiceLocator.Instance.HiveDao.IsUserAuthorizedForJobs(UserId, jobIds);44 //}45 46 36 public void Authorize(Guid userId) { 47 if (userId != this.UserId) {37 if (userId != this.UserId) 48 38 throw new SecurityException("User '" + Identity.UserName + "' is not authorized to access object"); 49 }50 39 } 51 40 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeartbeatManager.cs
r6357 r6369 31 31 slave.FreeMemory = heartbeat.FreeMemory; 32 32 slave.CpuUtilization = heartbeat.CpuUtilization; 33 slave.IsAllowedToCalculate = true; // Todo: look into calendar33 slave.IsAllowedToCalculate = SlaveIsAllowedToCalculate(slave.Id); 34 34 slave.SlaveState = (heartbeat.JobProgress != null && heartbeat.JobProgress.Count > 0) ? SlaveState.Calculating : SlaveState.Idle; 35 35 slave.LastHeartbeat = DateTime.Now; … … 37 37 38 38 // update job data 39 actions.AddRange(UpdateJobs(heartbeat ));39 actions.AddRange(UpdateJobs(heartbeat, slave.IsAllowedToCalculate)); 40 40 41 41 // assign new job 42 42 if (heartbeat.AssignJob && slave.IsAllowedToCalculate && heartbeat.FreeCores > 0) { 43 // this part needs to be in a serializable transaction to avoid race conditions 44 //trans.UseTransaction(() => { 45 var availableJobs = dao.GetWaitingJobs(slave, 1); 46 if (availableJobs.Count() > 0) { 47 var job = availableJobs.First(); 48 actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateJob, job.Id)); 49 AssignJob(slave, job); 50 } 51 //}, true); 43 var availableJobs = dao.GetWaitingJobs(slave, 1); 44 if (availableJobs.Count() > 0) { 45 var job = availableJobs.First(); 46 actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateJob, job.Id)); 47 AssignJob(slave, job); 48 } 52 49 } 53 50 } … … 68 65 /// Checks if all the jobs sent by heartbeat are supposed to be calculated by this slave 69 66 /// </summary> 70 private IEnumerable<MessageContainer> UpdateJobs(Heartbeat heartbeat ) {67 private IEnumerable<MessageContainer> UpdateJobs(Heartbeat heartbeat, bool IsAllowedToCalculate) { 71 68 List<MessageContainer> actions = new List<MessageContainer>(); 72 69 … … 74 71 return actions; 75 72 76 // process the jobProgresses 77 foreach (var jobProgress in heartbeat.JobProgress) { 78 Job curJob = dao.GetJob(jobProgress.Key); 79 if (curJob == null) { 80 // job does not exist in db 81 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key)); 82 LogFactory.GetLogger(this.GetType().Namespace).Log("Job does not exist in DB: " + jobProgress.Key); 83 } else { 84 if (curJob.CurrentStateLog.SlaveId == Guid.Empty || curJob.CurrentStateLog.SlaveId != heartbeat.SlaveId) { 85 // assigned slave does not match heartbeat 86 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 87 LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate Job: " + curJob); 88 } else if (!JobIsAllowedToBeCalculatedBySlave(heartbeat.SlaveId, curJob)) { 89 // assigned resources ids of job do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group 90 actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id)); 73 if (!IsAllowedToCalculate) { 74 actions.Add(new MessageContainer(MessageContainer.MessageType.PauseAll)); 75 } else { 76 // process the jobProgresses 77 foreach (var jobProgress in heartbeat.JobProgress) { 78 Job curJob = dao.GetJob(jobProgress.Key); 79 if (curJob == null) { 80 // job does not exist in db 81 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key)); 82 LogFactory.GetLogger(this.GetType().Namespace).Log("Job does not exist in DB: " + jobProgress.Key); 91 83 } else { 92 // save job execution time 93 curJob.ExecutionTime = jobProgress.Value; 94 curJob.LastHeartbeat = DateTime.Now; 84 if (curJob.CurrentStateLog.SlaveId == Guid.Empty || curJob.CurrentStateLog.SlaveId != heartbeat.SlaveId) { 85 // assigned slave does not match heartbeat 86 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 87 LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate Job: " + curJob); 88 } else if (!JobIsAllowedToBeCalculatedBySlave(heartbeat.SlaveId, curJob)) { 89 // assigned resources ids of job do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group 90 actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id)); 91 } else { 92 // save job execution time 93 curJob.ExecutionTime = jobProgress.Value; 94 curJob.LastHeartbeat = DateTime.Now; 95 95 96 switch (curJob.Command) { 97 case Command.Stop: 98 actions.Add(new MessageContainer(MessageContainer.MessageType.StopJob, curJob.Id)); 99 break; 100 case Command.Pause: 101 actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id)); 102 break; 103 case Command.Abort: 104 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 105 break; 96 switch (curJob.Command) { 97 case Command.Stop: 98 actions.Add(new MessageContainer(MessageContainer.MessageType.StopJob, curJob.Id)); 99 break; 100 case Command.Pause: 101 actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id)); 102 break; 103 case Command.Abort: 104 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 105 break; 106 } 107 dao.UpdateJob(curJob); 106 108 } 107 dao.UpdateJob(curJob);108 109 } 109 110 } … … 117 118 return assignedResourceIds.Any(x => slaveResourceIds.Contains(x)); 118 119 } 120 121 private bool SlaveIsAllowedToCalculate(Guid slaveId) { 122 // appointment==doNotCompute! the slave may only calculate if there is no appointment right now. this needs to be checked for every parent resource also 123 return dao.GetParentResources(slaveId).All(r => dao.GetAppointments(x => x.ResourceId == r.Id && (DateTime.Now >= x.StartDate) && (DateTime.Now <= x.EndDate)).Count() == 0); 124 } 119 125 } 120 126 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeuristicLab.Services.Hive-3.4.csproj
r6362 r6369 72 72 </PropertyGroup> 73 73 <ItemGroup> 74 <Reference Include="HeuristicLab.Clients.Common-3.3">75 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>76 </Reference>77 74 <Reference Include="HeuristicLab.Common-3.3"> 78 75 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> … … 135 132 <None Include="HeuristicLab.snk" /> 136 133 </ItemGroup> 137 <ItemGroup> 138 <Folder Include="Standalone\" /> 139 </ItemGroup> 134 <ItemGroup /> 140 135 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 141 136 <ProjectExtensions> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeuristicLabServicesHivePlugin.cs.frame
r6033 r6369 8 8 [Plugin("HeuristicLab.Services.Hive", "3.4.0.$WCREV$")] 9 9 [PluginFile("HeuristicLab.Services.Hive-3.4.dll", PluginFileType.Assembly)] 10 [PluginDependency("HeuristicLab.Clients.Common", "3.3")]11 10 [PluginDependency("HeuristicLab.Common", "3.3")] 12 11 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveRoles.cs
r6000 r6369 20 20 #endregion 21 21 22 23 22 namespace HeuristicLab.Services.Hive { 24 23 public static class HiveRoles { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r6367 r6369 317 317 return trans.UseTransaction(() => { 318 318 foreach (Guid guid in pluginIds) { 319 List<PluginData> pluginData = dao.GetPluginDatas(x => x.PluginId == guid).ToList(); 320 if (pluginData != null) { 321 pluginDatas.AddRange(pluginData); 322 } else { 323 //ignore ? 324 } 319 pluginDatas.AddRange(dao.GetPluginDatas(x => x.PluginId == guid).ToList()); 325 320 } 326 321 return pluginDatas; … … 420 415 421 416 public void TriggerLifecycle(bool force) { 422 // use a serializable transaction here to ensure not two threads execute this simultaniously ( lockingwould not work since IIS may use multiple AppDomains)417 // use a serializable transaction here to ensure not two threads execute this simultaniously (mutex-lock would not work since IIS may use multiple AppDomains) 423 418 trans.UseTransaction(() => { 424 419 DateTime lastCleanup = dao.GetLastCleanup(); … … 444 439 445 440 if (includeParent) jobs.Add(GetJob(parentJobId.Value)); 446 447 441 return jobs; 448 442 } 449 450 443 #endregion 451 444 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/Interfaces/IAuthorizationManager.cs
r5511 r6369 29 29 30 30 /// <summary> 31 /// Checks if the user is allowed to access all the jobs.32 /// throws an exception if one of those jobs is inaccessible33 /// </summary>34 /// <exception cref="SecurityException">thrown when access denied</exception>35 //void AuthorizeJobs(params Guid[] jobId);36 37 /// <summary>38 31 /// Compares the current UserId with the given userId and takes appropriate actions if the mismatch 39 32 /// </summary> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/Interfaces/ILifecycleManager.cs
r5593 r6369 1 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 2 22 namespace HeuristicLab.Services.Hive { 3 23 /// <summary> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/Interfaces/IServiceLocator.cs
r6362 r6369 1 using HeuristicLab.Services.Hive.DataAccess; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using HeuristicLab.Services.Hive.DataAccess; 2 23 3 24 namespace HeuristicLab.Services.Hive {
Note: See TracChangeset
for help on using the changeset viewer.