Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/11 13:43:05 (13 years ago)
Author:
cneumuel
Message:

#1233

  • changed relationship between Job and HiveExperiment. There is no more HiveExperiment.RootJobId, instead there is Job.HiveExperimentId.
  • One HiveExperiment can now have multiple Experiments.
  • TreeView supports multiple root nodes
  • HiveEngine creates a HiveExperiment for each set of jobs, so jobs cannot be without an parent experiment anymore (no more loose jobs)
  • updated ExperimentManager binaries
Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources

    • Property svn:ignore
      •  

        old new  
        44PrecompiledWeb
        55CreateEventLogSources
         6WindowsFormsTestProject
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs

    r5955 r6006  
    237237
    238238    private DT.HiveExperiment AddStatsToExperiment(HiveDataContext db, DT.HiveExperiment exp) {
    239       var jobs = new List<Job>();
    240       CollectChildJobs(db, exp.RootJobId, jobs);
    241       exp.JobCount = jobs.Count;
     239      if (exp == null)
     240        return null;
     241
     242      var jobs = db.Jobs.Where(j => j.HiveExperimentId == exp.Id);
     243      exp.JobCount = jobs.Count();
    242244      exp.CalculatingCount = jobs.Count(j => j.State == JobState.Calculating);
    243245      exp.FinishedCount = jobs.Count(j => j.State == JobState.Finished);
     
    575577    public Guid GetExperimentForJob(Guid jobId) {
    576578      using (var db = CreateContext()) {
    577         var job = db.Jobs.SingleOrDefault(j => j.JobId == jobId);
    578         if (job.ParentJobId.HasValue) {
    579           return GetExperimentForJob(job.ParentJobId.Value);
    580         } else {
    581           return db.HiveExperiments.SingleOrDefault(he => he.RootJobId == jobId).HiveExperimentId;
    582         }
     579        return db.Jobs.Single(j => j.JobId == jobId).HiveExperimentId;
    583580      }
    584581    }
Note: See TracChangeset for help on using the changeset viewer.