Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/23/09 11:35:41 (15 years ago)
Author:
svonolfe
Message:

Avoid out of memory exceptions related to job objects (#372)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs

    r2068 r2082  
    297297        bool sandboxed = false;
    298298        List<byte[]> files = new List<byte[]>();
    299         foreach (CachedHivePluginInfo plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded))
     299        foreach (CachedHivePluginInfo plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.JobInfo.PluginsNeeded))
    300300          files.AddRange(plugininfo.PluginFiles);
    301        
    302         AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, null, files);
     301
     302        AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.JobInfo.Id.ToString(), sandboxed, null, files);
    303303        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    304         lock (engines) {                   
    305           if (!jobs.ContainsKey(e.Result.Job.Id)) {
    306             jobs.Add(e.Result.Job.Id, e.Result.Job);
    307             appDomains.Add(e.Result.Job.Id, appDomain);
     304        lock (engines) {
     305          if (!jobs.ContainsKey(e.Result.Job.JobInfo.Id)) {
     306            jobs.Add(e.Result.Job.JobInfo.Id, e.Result.Job.JobInfo);
     307            appDomains.Add(e.Result.Job.JobInfo.Id, appDomain);
    308308
    309309            Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
    310             engine.JobId = e.Result.Job.Id;
     310            engine.JobId = e.Result.Job.JobInfo.Id;
    311311            engine.Queue = MessageQueue.GetInstance();           
    312312            engine.Start(e.Result.Job.SerializedJob);
    313             engines.Add(e.Result.Job.Id, engine);
     313            engines.Add(e.Result.Job.JobInfo.Id, engine);
    314314
    315315            ClientStatusInfo.JobsFetched++;
Note: See TracChangeset for help on using the changeset viewer.