Changeset 2078
- Timestamp:
- 06/22/09 15:10:03 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Grid.HiveBridge/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLab.Grid.HiveBridge-3.2.csproj
r2073 r2078 47 47 <DebugType>pdbonly</DebugType> 48 48 <PlatformTarget>x86</PlatformTarget> 49 <ErrorReport>prompt</ErrorReport> 50 </PropertyGroup> 51 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 52 <DebugSymbols>true</DebugSymbols> 53 <OutputPath>bin\x64\Debug\</OutputPath> 54 <DefineConstants>DEBUG;TRACE</DefineConstants> 55 <DebugType>full</DebugType> 56 <PlatformTarget>x64</PlatformTarget> 57 <ErrorReport>prompt</ErrorReport> 58 </PropertyGroup> 59 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 60 <OutputPath>bin\x64\Release\</OutputPath> 61 <DefineConstants>TRACE</DefineConstants> 62 <Optimize>true</Optimize> 63 <DebugType>pdbonly</DebugType> 64 <PlatformTarget>x64</PlatformTarget> 49 65 <ErrorReport>prompt</ErrorReport> 50 66 </PropertyGroup> -
trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HiveGridServerWrapper.cs
r2073 r2078 70 70 response.Success && response.Obj != null) { 71 71 HeuristicLab.Hive.Engine.Job restoredJob = (HeuristicLab.Hive.Engine.Job)PersistenceManager.RestoreFromGZip(response.Obj.Result); 72 // Serialize the engine 73 MemoryStream memStream = new MemoryStream(); 74 GZipStream stream = new GZipStream(memStream, CompressionMode.Compress, true); 75 XmlDocument document = PersistenceManager.CreateXmlDocument(); 76 Dictionary<Guid, IStorable> dictionary = new Dictionary<Guid, IStorable>(); 77 XmlNode rootNode = document.CreateElement("Root"); 78 document.AppendChild(rootNode); 79 rootNode.AppendChild(PersistenceManager.Persist(restoredJob.Engine, document, dictionary)); 80 document.Save(stream); 81 stream.Close(); 82 return memStream.ToArray(); 83 } else return null; 72 // only return the engine when it wasn't canceled (result is only a snapshot) 73 if (!restoredJob.Engine.Canceled) { 74 // Serialize the engine 75 MemoryStream memStream = new MemoryStream(); 76 GZipStream stream = new GZipStream(memStream, CompressionMode.Compress, true); 77 XmlDocument document = PersistenceManager.CreateXmlDocument(); 78 Dictionary<Guid, IStorable> dictionary = new Dictionary<Guid, IStorable>(); 79 XmlNode rootNode = document.CreateElement("Root"); 80 document.AppendChild(rootNode); 81 rootNode.AppendChild(PersistenceManager.Persist(restoredJob.Engine, document, dictionary)); 82 document.Save(stream); 83 stream.Close(); 84 return memStream.ToArray(); 85 } 86 } 87 88 return null; 84 89 } 85 90
Note: See TracChangeset
for help on using the changeset viewer.