Changeset 2063
- Timestamp:
- 06/18/09 17:19:32 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs
r2025 r2063 267 267 if (e.Error == null && e.Result.Success == true) 268 268 SendHeartBeatCompleted(sender, e); 269 else 269 else { 270 Logging.Instance.Error(this.ToString(), "Error: " + e.Result.StatusMessage); 270 271 HandleNetworkError(e.Error); 272 } 271 273 } 272 274 -
trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs
r2025 r2063 176 176 case MessageContainer.MessageType.UptimeLimitDisconnect: 177 177 Logging.Instance.Info(this.ToString(), "Uptime Limit reached, storing jobs and sending them back"); 178 WcfService.Instance.Disconnect(); 178 179 //check if there are running jobs 180 if (engines.Count > 0) { 181 //make sure there is no more fetching of jobs while the snapshots get processed 182 currentlyFetching = true; 183 //request a snapshot of each running job 184 foreach (KeyValuePair<Guid, Executor> kvp in engines) { 185 kvp.Value.RequestSnapshot(); 186 } 187 188 } else { 189 //Disconnect afterwards 190 WcfService.Instance.Disconnect(); 191 } 179 192 break; 180 193 … … 239 252 engines[jId].Progress, 240 253 null); 241 engines[jId].StartOnlyJob(); 254 255 //Uptime Limit reached, now is a good time to destroy this jobs. 256 if (!UptimeManager.Instance.isOnline()) { 257 lock (engines) { 258 appDomains[jId].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 259 AppDomain.Unload(appDomains[jId]); 260 appDomains.Remove(jId); 261 engines.Remove(jId); 262 jobs.Remove(jId); 263 } 264 GC.Collect(); 265 266 //Still anything running? 267 if (engines.Count == 0) 268 WcfService.Instance.Disconnect(); 269 270 } else { 271 engines[jId].StartOnlyJob(); 272 } 242 273 } 243 274 … … 249 280 void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) { 250 281 if (e.Result.Success) { 282 currentlyFetching = false; 251 283 Logging.Instance.Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now); 252 284 } else
Note: See TracChangeset
for help on using the changeset viewer.