Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1031 for trunk/sources


Ignore:
Timestamp:
12/18/08 15:33:48 (16 years ago)
Author:
kgrading
Message:

implementation for #438

Location:
trunk/sources/HeuristicLab.Hive.Client.Core
Files:
3 edited

Legend:

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

    r993 r1031  
    9696      Dictionary<long, Executor> engines = Core.GetExecutionEngines();
    9797      st.Jobs = new List<JobStatus>();
     98
    9899      foreach (KeyValuePair<long, Executor> kvp in engines) {
    99100        Executor e = kvp.Value;
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r1015 r1031  
    151151        AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, typeof(TestJob));
    152152        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    153 
    154         jobs.Add(e.Result.Job.Id, e.Result.Job);
    155         appDomains.Add(e.Result.Job.Id, appDomain);
    156 
    157         Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
    158         engine.JobId = e.Result.Job.Id;
    159         engine.Queue = MessageQueue.GetInstance();
    160         engine.Start(e.Result.SerializedJob);
    161         engines.Add(e.Result.Job.Id, engine);
    162 
    163         ClientStatusInfo.JobsFetched++;
    164 
    165         Debug.WriteLine("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched);
     153        if (!jobs.ContainsKey(e.Result.Job.Id)) {
     154          jobs.Add(e.Result.Job.Id, e.Result.Job);
     155          appDomains.Add(e.Result.Job.Id, appDomain);
     156
     157          Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
     158          engine.JobId = e.Result.Job.Id;
     159          engine.Queue = MessageQueue.GetInstance();
     160          engine.Start(e.Result.SerializedJob);
     161          engines.Add(e.Result.Job.Id, engine);
     162
     163          ClientStatusInfo.JobsFetched++;
     164
     165          Debug.WriteLine("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched);
     166        }
    166167      }
    167168    }
  • trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs

    r993 r1031  
    7171    /// <param name="e"></param>
    7272    void heartbeatTimer_Elapsed(object sender, ElapsedEventArgs e) {
    73       Console.WriteLine("tick");
     73      Console.WriteLine("tick"); 
    7474      ClientInfo info = ConfigManager.Instance.GetClientInfo();
    7575      // Todo: remove tempfix for free cores.
     76      // TODO: change jobProgress from int to Dictionary of Job and Double
    7677      HeartBeatData heartBeatData = new HeartBeatData { ClientId = info.ClientId,
    7778                                                              freeCores = info.NrOfCores - (ClientStatusInfo.JobsFetched - ClientStatusInfo.JobsProcessed),
Note: See TracChangeset for help on using the changeset viewer.