Changeset 393 for trunk/sources/HeuristicLab.CEDMA.Server/RunScheduler.cs
- Timestamp:
- 07/22/08 23:29:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/RunScheduler.cs
r392 r393 31 31 using HeuristicLab.Grid; 32 32 using System.Diagnostics; 33 using HeuristicLab.Data; 33 34 34 35 namespace HeuristicLab.CEDMA.Server { … … 39 40 public AtomicOperation Operation; 40 41 } 42 private string serverUri; 41 43 private Database database; 42 44 private JobManager jobManager; … … 47 49 private AutoResetEvent runningJobs = new AutoResetEvent(false); 48 50 49 public RunScheduler(Database database, JobManager jobManager ) {51 public RunScheduler(Database database, JobManager jobManager, string serverUri) { 50 52 this.database = database; 51 53 this.jobManager = jobManager; 54 this.serverUri = serverUri; 52 55 jobQueue = new Queue<Job>(); 53 56 Thread resultsGatheringThread = new Thread(GatherResults); … … 66 69 } 67 70 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); 70 78 WaitHandle wHandle; 71 79 lock(remoteCommLock) {
Note: See TracChangeset
for help on using the changeset viewer.