Changeset 3013
- Timestamp:
- 03/12/10 13:42:37 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HiveGridServerWrapper.cs
r2591 r3013 48 48 49 49 public JobState JobState(Guid guid) { 50 ResponseObject<SerializedJob Result> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false));50 ResponseObject<SerializedJob> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false)); 51 51 if (response != null) { 52 52 return HeuristicLab.Grid.JobState.Busy; … … 57 57 var jobObj = CreateJobObj(engine); 58 58 59 ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.Job > res = SavelyExecute(() => executionEngine.AddJob(jobObj));59 ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.JobDto> res = SavelyExecute(() => executionEngine.AddJob(jobObj)); 60 60 return res == null ? Guid.Empty : res.Obj.Id; 61 61 } 62 62 63 63 public byte[] TryEndExecuteEngine(Guid guid) { 64 ResponseObject<SerializedJob Result> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false));64 ResponseObject<SerializedJob> response = SavelyExecute(() => executionEngine.GetLastSerializedResult(guid, false)); 65 65 if (response != null && 66 66 response.Success && response.Obj != null) { 67 HeuristicLab.Hive.Engine.Job restoredJob = (HeuristicLab.Hive.Engine.Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJob ResultData);67 HeuristicLab.Hive.Engine.Job restoredJob = (HeuristicLab.Hive.Engine.Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobData); 68 68 // only return the engine when it wasn't canceled (result is only a snapshot) 69 69 if (restoredJob.Progress == 1.0) { … … 86 86 87 87 private HeuristicLab.Hive.Contracts.BusinessObjects.SerializedJob CreateJobObj(byte[] serializedEngine) { 88 HeuristicLab.Hive.Contracts.BusinessObjects.Job jobObj = new HeuristicLab.Hive.Contracts.BusinessObjects.Job();88 HeuristicLab.Hive.Contracts.BusinessObjects.JobDto jobObj = new HeuristicLab.Hive.Contracts.BusinessObjects.JobDto(); 89 89 90 List<HivePluginInfo > requiredPlugins = new List<HivePluginInfo>();90 List<HivePluginInfoDto> requiredPlugins = new List<HivePluginInfoDto>(); 91 91 IEngine engine = RestoreEngine(serializedEngine, requiredPlugins); 92 92 … … 119 119 } 120 120 121 private IEngine RestoreEngine(byte[] serializedEngine, List<HivePluginInfo > requiredPlugins) {121 private IEngine RestoreEngine(byte[] serializedEngine, List<HivePluginInfoDto> requiredPlugins) { 122 122 // unzip and restore to determine the list of required plugins (NB: inefficient!) 123 123 MemoryStream memStream = new MemoryStream(serializedEngine); … … 144 144 145 145 foreach (IPluginDescription uniquePlugin in plugins) { 146 HivePluginInfo pluginInfo =147 new HivePluginInfo ();146 HivePluginInfoDto pluginInfo = 147 new HivePluginInfoDto(); 148 148 pluginInfo.Name = uniquePlugin.Name; 149 149 pluginInfo.Version = uniquePlugin.Version.ToString(); -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
r3011 r3013 422 422 423 423 lblJobName.Text = currentJob.Id.ToString(); 424 progressJob.Value = (int)(currentJob.Percentage * 100); 425 lblProgress.Text = (int)(currentJob.Percentage * 100) + "% calculated"; 424 if (currentJob.Percentage != null) { 425 progressJob.Value = (int) (currentJob.Percentage*100); 426 lblProgress.Text = (int) (currentJob.Percentage*100) + "% calculated"; 427 } 426 428 427 429 ListViewItem lvi = new ListViewItem(); -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs
r3011 r3013 103 103 " wasn't offline but hasn't sent heartbeats - setting offline"); 104 104 client.State = State.offline; 105 DaoLocator.ClientDao.Update(client); 106 //clientAdapter.Update(client); 105 DaoLocator.ClientDao.Update(client); 107 106 HiveLogger.Info(this.ToString() + ": Client " + client.Id + 108 107 " wasn't offline but hasn't sent heartbeats - Resetting all his jobs"); -
trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/JobDao.cs
r3011 r3013 102 102 public Stream GetSerializedJobStream(Guid jobId) { 103 103 HiveDataContext hdc = new HiveDataContext(); 104 hdc.Transaction = null;105 104 String ConnStr = hdc.Connection.ConnectionString; 105 SqlConnection connection = new SqlConnection(hdc.Connection.ConnectionString); 106 106 VarBinarySource source = 107 107 new VarBinarySource( 108 hdc.Connection as SqlConnection, null,108 connection, null, 109 109 "Job", "SerializedJob", "JobId", jobId); 110 110 -
trunk/sources/HeuristicLab.Hive.Server/3.2/ServiceCallInterception.cs
r3011 r3013 17 17 Object obj; 18 18 19 using (TransactionScope scope = new TransactionScope()) {19 // using (TransactionScope scope = new TransactionScope()) { 20 20 try { 21 21 obj = invocation.Proceed(); 22 scope.Complete();22 // scope.Complete(); 23 23 } finally { 24 24 ContextFactory.Context.Dispose(); … … 27 27 Console.WriteLine("Disposing old Context"); 28 28 } 29 }29 // } 30 30 Console.WriteLine(DateTime.Now + " - " + Thread.CurrentThread.ManagedThreadId + " - Leaving Method " + invocation.Method.Name); 31 31 return obj;
Note: See TracChangeset
for help on using the changeset viewer.