Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/08 15:19:15 (17 years ago)
Author:
gkronber
Message:

return the whole engine as the result instead of only the scope

(ticket ref #2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DistributedEngine/DistributedEngine.cs

    r33 r34  
    9090      if(runningEngines.Count != 0) {
    9191        Guid engineGuid = runningEngines[0];
    92         byte[] scopeXml = server.TryEndExecuteEngine(engineGuid,100);
    93         if(scopeXml != null) {
    94           GZipStream stream = new GZipStream(new MemoryStream(scopeXml), CompressionMode.Decompress);
    95           IScope newScope = (IScope)PersistenceManager.Load(stream);
     92        byte[] resultXml = server.TryEndExecuteEngine(engineGuid,100);
     93        if(resultXml != null) {
     94          GZipStream stream = new GZipStream(new MemoryStream(resultXml), CompressionMode.Decompress);
     95          ProcessingEngine resultEngine = (ProcessingEngine)PersistenceManager.Load(stream);
    9696          IScope oldScope = engineOperations[engineGuid].Scope;
    9797          oldScope.Clear();
    98           foreach(IVariable variable in newScope.Variables) {
     98          foreach(IVariable variable in resultEngine.InitialOperation.Scope.Variables) {
    9999            oldScope.AddVariable(variable);
    100100          }
    101           foreach(IScope subScope in newScope.SubScopes) {
     101          foreach(IScope subScope in resultEngine.InitialOperation.Scope.SubScopes) {
    102102            oldScope.AddSubScope(subScope);
    103103          }
Note: See TracChangeset for help on using the changeset viewer.