- Timestamp:
- 07/22/08 23:29:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Operators/OnGridProcessor.cs
r390 r393 40 40 AddVariableInfo(new VariableInfo("AgentId", "Id of the agent that the run should be associated to.", typeof(IntData), VariableKind.In)); 41 41 AddVariableInfo(new VariableInfo("OperatorGraph", "The operator graph that should be executed on the grid", typeof(IOperatorGraph), VariableKind.In)); 42 AddVariableInfo(new VariableInfo(" ServerUrl", "Urlof the CEDMA server", typeof(StringData), VariableKind.In));42 AddVariableInfo(new VariableInfo("CedmaServerUri", "Uri of the CEDMA server", typeof(StringData), VariableKind.In)); 43 43 } 44 44 … … 46 46 47 47 IOperatorGraph operatorGraph = scope.GetVariableValue<IOperatorGraph>("OperatorGraph", false); 48 string serverUrl = scope.GetVariableValue<StringData>(" ServerUrl", true).Data;48 string serverUrl = scope.GetVariableValue<StringData>("CedmaServerUri", true).Data; 49 49 long agentId = scope.GetVariableValue<IntData>("AgentId", true).Data; 50 51 Agent agent = new Agent(); 52 foreach(IOperator op in operatorGraph.Operators) { 53 agent.OperatorGraph.AddOperator(op); 54 } 55 agent.OperatorGraph.InitialOperator = operatorGraph.InitialOperator; 50 56 51 57 NetTcpBinding binding = new NetTcpBinding(); … … 56 62 using(ChannelFactory<IDatabase> factory = new ChannelFactory<IDatabase>(binding)) { 57 63 IDatabase database = factory.CreateChannel(new EndpointAddress(serverUrl)); 58 long id = database.InsertAgent(agentId, null, false, DbPersistenceManager.Save( operatorGraph));64 long id = database.InsertAgent(agentId, null, false, DbPersistenceManager.Save(agent)); 59 65 database.UpdateAgent(id, ProcessStatus.Waiting); 60 66 }
Note: See TracChangeset
for help on using the changeset viewer.