Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/08 23:29:18 (16 years ago)
Author:
gkronber
Message:

worked on very basic control to view the tree of agents/runs (ticket #188)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Server/RunScheduler.cs

    r392 r393  
    3131using HeuristicLab.Grid;
    3232using System.Diagnostics;
     33using HeuristicLab.Data;
    3334
    3435namespace HeuristicLab.CEDMA.Server {
     
    3940      public AtomicOperation Operation;
    4041    }
     42    private string serverUri;
    4143    private Database database;
    4244    private JobManager jobManager;
     
    4749    private AutoResetEvent runningJobs = new AutoResetEvent(false);
    4850
    49     public RunScheduler(Database database, JobManager jobManager) {
     51    public RunScheduler(Database database, JobManager jobManager, string serverUri) {
    5052      this.database = database;
    5153      this.jobManager = jobManager;
     54      this.serverUri = serverUri;
    5255      jobQueue = new Queue<Job>();
    5356      Thread resultsGatheringThread = new Thread(GatherResults);
     
    6669      }
    6770      foreach(AgentEntry entry in agents) {
    68         IOperatorGraph opGraph = (IOperatorGraph)DbPersistenceManager.Restore(entry.RawData);
    69         AtomicOperation op = new AtomicOperation(opGraph.InitialOperator, new Scope());
     71        Agent agent = (Agent)DbPersistenceManager.Restore(entry.RawData);
     72        IOperatorGraph opGraph = agent.OperatorGraph;
     73        Scope scope = new Scope();
     74        // initialize CEDMA variables for the execution of the agent
     75        scope.AddVariable(new Variable("AgentId", new IntData((int)entry.Id)));
     76        scope.AddVariable(new Variable("CedmaServerUri", new StringData(serverUri)));
     77        AtomicOperation op = new AtomicOperation(opGraph.InitialOperator, scope);
    7078        WaitHandle wHandle;
    7179        lock(remoteCommLock) {
Note: See TracChangeset for help on using the changeset viewer.