Changeset 13872


Ignore:
Timestamp:
06/03/16 15:10:08 (3 years ago)
Author:
jlodewyc
Message:

#2582 fix: compression error when loading jobs

Location:
branches/WebJobManager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/OkbManagementController.cs

    r13871 r13872  
    44using HeuristicLab.Common;
    55using HeuristicLab.Optimization;
     6using HeuristicLab.Persistence.Default.Xml;
    67using Microsoft.AspNetCore.Http;
    78using Microsoft.AspNetCore.Mvc;
     
    7677                        }
    7778                    }
    78                     var deser = PersistenceUtil.Deserialize<IOptimizer>(data);
     79                    var deser = PersistenceUtil.Deserialize<IOptimizer>(data, CompressionType.Zip);
    7980                    OKB.Administration.IOKBItem obj = null;
    8081                    if (name == "Algorithms" && deser is IAlgorithm)
  • branches/WebJobManager/HeuristicLab.Clients.Hive/3.3/Util/PersistenceUtil.cs

    r13871 r13872  
    5454            using (MemoryStream memStream = new MemoryStream(sjob))
    5555            {
    56                 T job = XmlParser.Deserialize<T>(memStream, CompressionType.Zip);
     56                T job = XmlParser.Deserialize<T>(memStream);
     57                return job;
     58            }
     59        }
     60        public static T Deserialize<T>(byte[] sjob, CompressionType typ)
     61        {
     62            using (MemoryStream memStream = new MemoryStream(sjob))
     63            {
     64                T job = XmlParser.Deserialize<T>(memStream, typ);
    5765                return job;
    5866            }
Note: See TracChangeset for help on using the changeset viewer.