Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/08 15:14:02 (16 years ago)
Author:
kgrading
Message:

fixed fetchjobcompleted and sendheartbeat method (#430)

File:
1 edited

Legend:

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

    r949 r960  
    144144
    145145    void wcfService_PullJobCompleted(object sender, PullJobCompletedEventArgs e) {
    146       bool sandboxed = false;
     146      if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) {
     147        bool sandboxed = false;
    147148
    148       PluginManager.Manager.Initialize();
    149       AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed, typeof(TestJob));
    150      
    151       appDomains.Add(e.Result.JobId, appDomain);
     149        PluginManager.Manager.Initialize();
     150        AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed, typeof(TestJob));     
     151        appDomains.Add(e.Result.JobId, appDomain);
    152152
    153       Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
    154       engine.JobId = e.Result.JobId;
    155       engine.Queue = MessageQueue.GetInstance();
    156       engine.Start(e.Result.SerializedJob);
    157       engines.Add(e.Result.JobId, engine);
     153        Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
     154        engine.JobId = e.Result.JobId;
     155        engine.Queue = MessageQueue.GetInstance();
     156        engine.Start(e.Result.SerializedJob);
     157        engines.Add(e.Result.JobId, engine);
    158158
    159       ClientStatusInfo.JobsFetched++;
     159        ClientStatusInfo.JobsFetched++;
    160160
    161       Debug.WriteLine("Increment FetchedJobs to:"+ClientStatusInfo.JobsFetched);
     161        Debug.WriteLine("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched);
     162      }
    162163    }
    163164
Note: See TracChangeset for help on using the changeset viewer.