Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/02/11 19:07:24 (13 years ago)
Author:
ascheibe
Message:

#1233

  • don't lock engines for so long in StartJobInAppDomain
  • move SlaveCommListener to ConsoleClient
  • delete orphaned job folders at startup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs

    r6100 r6101  
    7979        slaveComm = new ServiceHost(typeof(SlaveCommunicationService));
    8080        slaveComm.Open();
    81 
    8281        clientCom = SlaveClientCom.Instance.ClientCom;
     82
     83        // delete all left over job directories
     84        PluginCache.Instance.CleanPluginTemp();
    8385        clientCom.LogMessage("Hive Slave started");
    8486
     
    483485            AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(myJob.Id.ToString(), pluginDir, Path.Combine(pluginDir, configFileName));
    484486            appDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_UnhandledException);
     487            Executor engine;
    485488            lock (engines) {
    486489              appDomains.Add(myJob.Id, appDomain);
    487490              clientCom.LogMessage("Creating AppDomain");
    488               Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
     491              engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
    489492              clientCom.LogMessage("Created AppDomain");
    490493              engine.JobId = myJob.Id;
     
    492495              clientCom.LogMessage("Starting Engine for job " + myJob.Id);
    493496              engines.Add(myJob.Id, engine);
    494               engine.Start(jobData.Data);
    495497            }
    496 
     498            engine.Start(jobData.Data);
    497499          }
    498500          catch (Exception exception) {
Note: See TracChangeset for help on using the changeset viewer.