Changeset 4264 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
- Timestamp:
- 08/19/10 13:30:56 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r4263 r4264 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 26 using HeuristicLab.Hive.Slave.ExecutionEngine; 24 using System.IO; 25 using System.Threading; 26 using HeuristicLab.Core; 27 using HeuristicLab.Hive.Contracts; 28 using HeuristicLab.Hive.Contracts.BusinessObjects; 29 using HeuristicLab.Hive.Contracts.ResponseObjects; 27 30 using HeuristicLab.Hive.Slave.Common; 28 using System.Threading;29 using System.Reflection;30 using System.Diagnostics;31 using System.Security.Permissions;32 using System.Security.Policy;33 using System.Security;34 31 using HeuristicLab.Hive.Slave.Communication; 35 using HeuristicLab.Hive.Contracts.BusinessObjects; 36 using HeuristicLab.Hive.Contracts; 37 using System.Runtime.Remoting.Messaging; 38 using HeuristicLab.PluginInfrastructure; 39 using System.ServiceModel; 40 using System.ServiceModel.Description; 32 using HeuristicLab.Hive.Slave.Communication.ServerService; 41 33 using HeuristicLab.Hive.Slave.Core.ClientConsoleService; 42 34 using HeuristicLab.Hive.Slave.Core.ConfigurationManager; 43 using HeuristicLab.Hive.Slave.Communication.ServerService;44 using HeuristicLab.Hive.JobBase;45 35 using HeuristicLab.Hive.Slave.Core.JobStorage; 36 using HeuristicLab.Hive.Slave.ExecutionEngine; 46 37 using HeuristicLab.Tracing; 47 using HeuristicLab.Core;48 using System.IO;49 using HeuristicLab.Hive.Contracts.ResponseObjects;50 38 51 39 namespace HeuristicLab.Hive.Slave.Core { … … 102 90 103 91 //Initialize the heartbeat 104 beat = new Heartbeat { Interval = 10000};92 beat = new Heartbeat { Interval = new TimeSpan(0, 0, 10) }; 105 93 beat.StartHeartbeat(); 106 94 … … 171 159 Logger.Info("Uptime Limit reached, storing jobs and sending them back"); 172 160 173 //check if there are running jobs 174 if (engines.Count > 0) { 175 //make sure there is no more fetching of jobs while the snapshots get processed 176 CurrentlyFetching = true; 177 //request a snapshot of each running job 178 foreach (KeyValuePair<Guid, Executor> kvp in engines) { 179 kvp.Value.RequestSnapshot(); 180 } 181 182 } else { 183 //Disconnect afterwards 184 WcfService.Instance.Disconnect(); 185 } 161 ShutdownRunningJobsAndSubmitSnapshots(); 186 162 break; 187 163 … … 209 185 WcfService.Instance.Logout(ConfigManager.Instance.GetClientInfo().Id); 210 186 break; 187 } 188 } 189 190 private void ShutdownRunningJobsAndSubmitSnapshots() { 191 //check if there are running jobs 192 if (engines.Count > 0) { 193 //make sure there is no more fetching of jobs while the snapshots get processed 194 CurrentlyFetching = true; 195 //request a snapshot of each running job 196 foreach (KeyValuePair<Guid, Executor> kvp in engines) { 197 kvp.Value.RequestSnapshot(); 198 } 199 211 200 } 212 201 }
Note: See TracChangeset
for help on using the changeset viewer.