- Timestamp:
- 02/15/11 15:16:10 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Calendar/3.3/HeuristicLabCalendarPlugin.cs
r5457 r5469 24 24 25 25 namespace HeuristicLab.Calendar { 26 [Plugin("HeuristicLab.Calendar", "3.3.3. 0")]26 [Plugin("HeuristicLab.Calendar", "3.3.3.5457")] 27 27 [PluginFile("HeuristicLab.Calendar-3.3.dll", PluginFileType.Assembly)] 28 28 [PluginFile("DayView License.txt", PluginFileType.License)] -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs
r5457 r5469 56 56 // by using the '*' as shown below: 57 57 [assembly: AssemblyVersion("3.3.0.0")] 58 [assembly: AssemblyFileVersion("3.3.0. 0")]58 [assembly: AssemblyFileVersion("3.3.0.5457")] -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r5458 r5469 357 357 /// <param name="jobId"></param> 358 358 [MethodImpl(MethodImplOptions.Synchronized)] 359 public void SendFinishedJob( objectjobId) {359 public void SendFinishedJob(Guid jobId) { 360 360 try { 361 Guid jId = (Guid)jobId; 362 ClientCom.LogMessage("Getting the finished job with id: " + jId); 363 if (!engines.ContainsKey(jId)) { 361 ClientCom.LogMessage("Getting the finished job with id: " + jobId); 362 if (!engines.ContainsKey(jobId)) { 364 363 ClientCom.LogMessage("Engine doesn't exist"); 365 364 return; 366 365 } 367 if (!jobs.ContainsKey(j Id)) {366 if (!jobs.ContainsKey(jobId)) { 368 367 ClientCom.LogMessage("Job doesn't exist"); 369 368 return; 370 369 } 371 Job cJob = jobs[jId]; 372 373 JobData sJob = engines[jId].GetFinishedJob(); 374 cJob.Exception = engines[jId].CurrentException; 375 cJob.ExecutionTime = engines[jId].ExecutionTime; 370 Job cJob = jobs[jobId]; 371 cJob.JobState = JobState.Finished;//TODO: what if failed? 372 cJob.ExecutionTime = engines[jobId].ExecutionTime; 373 374 JobData sJob = engines[jobId].GetFinishedJob(); 375 cJob.Exception = engines[jobId].CurrentException; 376 cJob.ExecutionTime = engines[jobId].ExecutionTime; 376 377 377 378 try { 378 ClientCom.LogMessage("Sending the finished job with id: " + j Id);379 ClientCom.LogMessage("Sending the finished job with id: " + jobId); 379 380 wcfService.UpdateJob(cJob, sJob); 380 381 SlaveStatusInfo.JobsProcessed++; 381 382 } 382 383 catch (Exception e) { 383 ClientCom.LogMessage("Transmitting to server failed. Storing the finished job with id: " + j Id + " to hdd (" + e.ToString() + ")");384 ClientCom.LogMessage("Transmitting to server failed. Storing the finished job with id: " + jobId + " to hdd (" + e.ToString() + ")"); 384 385 } 385 386 finally { 386 KillAppDomain(j Id); // kill app-domain in every case387 KillAppDomain(jobId); // kill app-domain in every case 387 388 heartbeatManager.AwakeHeartBeatThread(); 388 389 } … … 464 465 /// <param name="parameter"></param> 465 466 /// <returns>true if the calling method can continue execution, else false</returns> 466 private bool EnqueueExecutorMessage<T>(Action<T> action, T parameter) { 467 public void EnqueueExecutorMessage<T>(Action<T> action, T parameter) { 468 ExecutorMessageContainer<T> container = new ExecutorMessageContainer<T>(); 469 container.Callback = action; 470 container.CallbackParameter = parameter; 471 MessageQueue.GetInstance().AddMessage(container); 472 } 473 474 /// <summary> 475 /// Kill a appdomain with a specific id. 476 /// </summary> 477 /// <param name="id">the GUID of the job</param> 478 //[MethodImpl(MethodImplOptions.Synchronized)] 479 public void KillAppDomain(Guid id) { 467 480 if (Thread.CurrentThread.ManagedThreadId != this.coreThreadId) { 468 ExecutorMessageContainer<T> container = new ExecutorMessageContainer<T>(); 469 container.Callback = action; 470 container.CallbackParameter = parameter; 471 MessageQueue.GetInstance().AddMessage(container); 472 return false; 473 } else { 474 return true; 475 } 476 } 477 478 /// <summary> 479 /// Kill a appdomain with a specific id. 480 /// </summary> 481 /// <param name="id">the GUID of the job</param> 482 [MethodImpl(MethodImplOptions.Synchronized)] 483 public void KillAppDomain(Guid id) { 484 if (EnqueueExecutorMessage<Guid>(KillAppDomain, id)) { 485 ClientCom.LogMessage("Shutting down Appdomain for Job " + id); 486 lock (engines) { 487 try { 488 if (engines.ContainsKey(id)) { 489 engines[id].Dispose(); 490 engines.Remove(id); 491 } 492 493 if (appDomains.ContainsKey(id)) { 494 appDomains[id].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 495 496 int repeat = 5; 497 while (repeat > 0) { 498 try { 499 AppDomain.Unload(appDomains[id]); 500 repeat = 0; 501 } 502 catch (CannotUnloadAppDomainException) { 503 ClientCom.LogMessage("Could not unload AppDomain, will try again in 1 sec."); 504 Thread.Sleep(1000); 505 repeat--; 506 if (repeat == 0) { 507 throw; // rethrow and let app crash 508 } 481 EnqueueExecutorMessage<Guid>(KillAppDomain, id); 482 return; 483 } 484 485 ClientCom.LogMessage("Shutting down Appdomain for Job " + id); 486 lock (engines) { 487 try { 488 if (engines.ContainsKey(id)) { 489 engines[id].Dispose(); 490 engines.Remove(id); 491 } 492 493 if (appDomains.ContainsKey(id)) { 494 appDomains[id].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 495 496 int repeat = 5; 497 while (repeat > 0) { 498 try { 499 AppDomain.Unload(appDomains[id]); 500 repeat = 0; 501 } 502 catch (CannotUnloadAppDomainException) { 503 ClientCom.LogMessage("Could not unload AppDomain, will try again in 1 sec."); 504 Thread.Sleep(1000); 505 repeat--; 506 if (repeat == 0) { 507 throw; // rethrow and let app crash 509 508 } 510 509 } 511 appDomains.Remove(id);512 510 } 513 514 jobs.Remove(id); 515 PluginCache.Instance.DeletePluginsForJob(id); 516 GC.Collect(); 511 appDomains.Remove(id); 517 512 } 518 catch (Exception ex) { 519 ClientCom.LogMessage("Exception when unloading the appdomain: " + ex.ToString()); 520 } 521 } 522 GC.Collect(); 523 } 513 514 jobs.Remove(id); 515 PluginCache.Instance.DeletePluginsForJob(id); 516 GC.Collect(); 517 } 518 catch (Exception ex) { 519 ClientCom.LogMessage("Exception when unloading the appdomain: " + ex.ToString()); 520 } 521 } 522 GC.Collect(); 524 523 } 525 524 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs
r5450 r5469 86 86 public void Pause() { 87 87 Job.Pause(); 88 88 89 89 } 90 90 … … 156 156 HeuristicLab.Common.EventArgs<Exception> ex = (HeuristicLab.Common.EventArgs<Exception>)e; 157 157 currentException = ex.Value; 158 Core. SendFinishedJob(JobId);158 Core.EnqueueExecutorMessage(Core.SendFinishedJob, JobId); 159 159 } 160 160 161 161 private void Job_JobStopped(object sender, EventArgs e) { 162 162 if (wasJobAborted) { 163 Core. KillAppDomain(JobId);163 Core.EnqueueExecutorMessage(Core.KillAppDomain, JobId); 164 164 } else { 165 Core. SendFinishedJob(JobId);165 Core.EnqueueExecutorMessage(Core.SendFinishedJob, JobId); 166 166 } 167 167 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs
r5458 r5469 265 265 tries = 0; 266 266 } 267 catch {267 catch (Exception e) { 268 268 Thread.Sleep(1000); 269 269 tries--; 270 if (tries == 0) throw; 270 if (tries == 0) throw;// TODO: don't know what do do 271 271 } 272 272 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/Administration/HiveAdministrationView.Designer.cs
r5457 r5469 47 47 this.tabAdmin = new System.Windows.Forms.TabControl(); 48 48 this.tabSlaves = new System.Windows.Forms.TabPage(); 49 this. tabUsers = new System.Windows.Forms.TabPage();49 this.splitSlaves = new System.Windows.Forms.SplitContainer(); 50 50 this.treeSlaveGroup = new System.Windows.Forms.TreeView(); 51 51 this.tabSlaveGroup = new System.Windows.Forms.TabControl(); … … 53 53 this.tabSchedule = new System.Windows.Forms.TabPage(); 54 54 this.tabJobs = new System.Windows.Forms.TabPage(); 55 this.splitSlaves = new System.Windows.Forms.SplitContainer(); 55 this.tabUsers = new System.Windows.Forms.TabPage(); 56 this.splitUsers = new System.Windows.Forms.SplitContainer(); 57 this.lstUsers = new System.Windows.Forms.ListView(); 58 this.grpUsersInfo = new System.Windows.Forms.GroupBox(); 56 59 this.scheduleControl1 = new HeuristicLab.Clients.Hive.Views.Administration.ScheduleControl(); 60 this.hiveJobListViewSlaves = new HeuristicLab.Clients.Hive.Views.HiveJobListView(); 57 61 this.tabAdmin.SuspendLayout(); 58 62 this.tabSlaves.SuspendLayout(); 59 this.tabSlaveGroup.SuspendLayout();60 this.tabSchedule.SuspendLayout();61 63 ((System.ComponentModel.ISupportInitialize)(this.splitSlaves)).BeginInit(); 62 64 this.splitSlaves.Panel1.SuspendLayout(); 63 65 this.splitSlaves.Panel2.SuspendLayout(); 64 66 this.splitSlaves.SuspendLayout(); 67 this.tabSlaveGroup.SuspendLayout(); 68 this.tabSchedule.SuspendLayout(); 69 this.tabJobs.SuspendLayout(); 70 this.tabUsers.SuspendLayout(); 71 ((System.ComponentModel.ISupportInitialize)(this.splitUsers)).BeginInit(); 72 this.splitUsers.Panel1.SuspendLayout(); 73 this.splitUsers.Panel2.SuspendLayout(); 74 this.splitUsers.SuspendLayout(); 65 75 this.SuspendLayout(); 66 76 // … … 89 99 this.tabSlaves.UseVisualStyleBackColor = true; 90 100 // 91 // tabUsers 92 // 93 this.tabUsers.Location = new System.Drawing.Point(4, 22); 94 this.tabUsers.Name = "tabUsers"; 95 this.tabUsers.Padding = new System.Windows.Forms.Padding(3); 96 this.tabUsers.Size = new System.Drawing.Size(734, 520); 97 this.tabUsers.TabIndex = 1; 98 this.tabUsers.Text = "Users"; 99 this.tabUsers.UseVisualStyleBackColor = true; 101 // splitSlaves 102 // 103 this.splitSlaves.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 104 | System.Windows.Forms.AnchorStyles.Left) 105 | System.Windows.Forms.AnchorStyles.Right))); 106 this.splitSlaves.Location = new System.Drawing.Point(3, 6); 107 this.splitSlaves.Name = "splitSlaves"; 108 // 109 // splitSlaves.Panel1 110 // 111 this.splitSlaves.Panel1.Controls.Add(this.treeSlaveGroup); 112 // 113 // splitSlaves.Panel2 114 // 115 this.splitSlaves.Panel2.Controls.Add(this.tabSlaveGroup); 116 this.splitSlaves.Size = new System.Drawing.Size(725, 508); 117 this.splitSlaves.SplitterDistance = 215; 118 this.splitSlaves.TabIndex = 2; 100 119 // 101 120 // treeSlaveGroup … … 146 165 // tabJobs 147 166 // 167 this.tabJobs.Controls.Add(this.hiveJobListViewSlaves); 148 168 this.tabJobs.Location = new System.Drawing.Point(4, 22); 149 169 this.tabJobs.Name = "tabJobs"; … … 154 174 this.tabJobs.UseVisualStyleBackColor = true; 155 175 // 156 // splitSlaves 157 // 158 this.splitSlaves.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 159 | System.Windows.Forms.AnchorStyles.Left) 160 | System.Windows.Forms.AnchorStyles.Right))); 161 this.splitSlaves.Location = new System.Drawing.Point(3, 6); 162 this.splitSlaves.Name = "splitSlaves"; 163 // 164 // splitSlaves.Panel1 165 // 166 this.splitSlaves.Panel1.Controls.Add(this.treeSlaveGroup); 167 // 168 // splitSlaves.Panel2 169 // 170 this.splitSlaves.Panel2.Controls.Add(this.tabSlaveGroup); 171 this.splitSlaves.Size = new System.Drawing.Size(725, 508); 172 this.splitSlaves.SplitterDistance = 215; 173 this.splitSlaves.TabIndex = 2; 176 // tabUsers 177 // 178 this.tabUsers.Controls.Add(this.splitUsers); 179 this.tabUsers.Location = new System.Drawing.Point(4, 22); 180 this.tabUsers.Name = "tabUsers"; 181 this.tabUsers.Padding = new System.Windows.Forms.Padding(3); 182 this.tabUsers.Size = new System.Drawing.Size(734, 520); 183 this.tabUsers.TabIndex = 1; 184 this.tabUsers.Text = "Users"; 185 this.tabUsers.UseVisualStyleBackColor = true; 186 // 187 // splitUsers 188 // 189 this.splitUsers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 190 | System.Windows.Forms.AnchorStyles.Left) 191 | System.Windows.Forms.AnchorStyles.Right))); 192 this.splitUsers.Location = new System.Drawing.Point(6, 6); 193 this.splitUsers.Name = "splitUsers"; 194 // 195 // splitUsers.Panel1 196 // 197 this.splitUsers.Panel1.Controls.Add(this.lstUsers); 198 // 199 // splitUsers.Panel2 200 // 201 this.splitUsers.Panel2.Controls.Add(this.grpUsersInfo); 202 this.splitUsers.Size = new System.Drawing.Size(722, 508); 203 this.splitUsers.SplitterDistance = 240; 204 this.splitUsers.TabIndex = 0; 205 // 206 // lstUsers 207 // 208 this.lstUsers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 209 | System.Windows.Forms.AnchorStyles.Left) 210 | System.Windows.Forms.AnchorStyles.Right))); 211 this.lstUsers.Location = new System.Drawing.Point(3, 3); 212 this.lstUsers.Name = "lstUsers"; 213 this.lstUsers.Size = new System.Drawing.Size(234, 502); 214 this.lstUsers.TabIndex = 0; 215 this.lstUsers.UseCompatibleStateImageBehavior = false; 216 // 217 // grpUsersInfo 218 // 219 this.grpUsersInfo.Location = new System.Drawing.Point(4, 4); 220 this.grpUsersInfo.Name = "grpUsersInfo"; 221 this.grpUsersInfo.Size = new System.Drawing.Size(474, 504); 222 this.grpUsersInfo.TabIndex = 0; 223 this.grpUsersInfo.TabStop = false; 224 this.grpUsersInfo.Text = "User Information"; 174 225 // 175 226 // scheduleControl1 … … 179 230 this.scheduleControl1.Size = new System.Drawing.Size(862, 562); 180 231 this.scheduleControl1.TabIndex = 0; 232 // 233 // hiveJobListViewSlaves 234 // 235 this.hiveJobListViewSlaves.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 236 | System.Windows.Forms.AnchorStyles.Left) 237 | System.Windows.Forms.AnchorStyles.Right))); 238 this.hiveJobListViewSlaves.Caption = "JobItemList View"; 239 this.hiveJobListViewSlaves.Content = null; 240 this.hiveJobListViewSlaves.Location = new System.Drawing.Point(7, 7); 241 this.hiveJobListViewSlaves.Name = "hiveJobListViewSlaves"; 242 this.hiveJobListViewSlaves.ReadOnly = false; 243 this.hiveJobListViewSlaves.Size = new System.Drawing.Size(499, 463); 244 this.hiveJobListViewSlaves.TabIndex = 0; 181 245 // 182 246 // HiveAdministrationView … … 189 253 this.tabAdmin.ResumeLayout(false); 190 254 this.tabSlaves.ResumeLayout(false); 191 this.tabSlaveGroup.ResumeLayout(false);192 this.tabSchedule.ResumeLayout(false);193 255 this.splitSlaves.Panel1.ResumeLayout(false); 194 256 this.splitSlaves.Panel2.ResumeLayout(false); 195 257 ((System.ComponentModel.ISupportInitialize)(this.splitSlaves)).EndInit(); 196 258 this.splitSlaves.ResumeLayout(false); 259 this.tabSlaveGroup.ResumeLayout(false); 260 this.tabSchedule.ResumeLayout(false); 261 this.tabJobs.ResumeLayout(false); 262 this.tabUsers.ResumeLayout(false); 263 this.splitUsers.Panel1.ResumeLayout(false); 264 this.splitUsers.Panel2.ResumeLayout(false); 265 ((System.ComponentModel.ISupportInitialize)(this.splitUsers)).EndInit(); 266 this.splitUsers.ResumeLayout(false); 197 267 this.ResumeLayout(false); 198 268 … … 211 281 private System.Windows.Forms.SplitContainer splitSlaves; 212 282 private ScheduleControl scheduleControl1; 283 private System.Windows.Forms.SplitContainer splitUsers; 284 private System.Windows.Forms.ListView lstUsers; 285 private System.Windows.Forms.GroupBox grpUsersInfo; 286 private HiveJobListView hiveJobListViewSlaves; 213 287 } 214 288 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/Administration/MenuItems/AdministrationMenuItem.cs
r5457 r5469 27 27 public class AdministrationMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 28 28 public override string Name { 29 get { return "& Hive Administration 3.4"; }29 get { return "& Administration"; } 30 30 } 31 31 public override IEnumerable<string> Structure {
Note: See TracChangeset
for help on using the changeset viewer.