Changeset 490 for trunk/sources
- Timestamp:
- 08/11/08 00:49:59 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Operators/OnGridProcessor.cs
r403 r490 38 38 : base() { 39 39 AddVariableInfo(new VariableInfo("AgentId", "Id of the agent that the run should be associated to.", typeof(IntData), VariableKind.In)); 40 AddVariableInfo(new VariableInfo("Operator Graph", "The operator graph that should be executed on the grid", typeof(IOperatorGraph), VariableKind.In));40 AddVariableInfo(new VariableInfo("Operator", "The operator that should be executed on the grid", typeof(IOperator), VariableKind.In)); 41 41 AddVariableInfo(new VariableInfo("CedmaServerUri", "Uri of the CEDMA server", typeof(StringData), VariableKind.In)); 42 42 } 43 43 44 44 public override IOperation Apply(IScope scope) { 45 IOperator Graph operatorGraph = scope.GetVariableValue<IOperatorGraph>("OperatorGraph", false);45 IOperator op = scope.GetVariableValue<IOperator>("Operator", true); 46 46 string serverUrl = scope.GetVariableValue<StringData>("CedmaServerUri", true).Data; 47 47 long agentId = scope.GetVariableValue<IntData>("AgentId", true).Data; … … 54 54 using(ChannelFactory<IDatabase> factory = new ChannelFactory<IDatabase>(binding)) { 55 55 IDatabase database = factory.CreateChannel(new EndpointAddress(serverUrl)); 56 long id = database.InsertAgent(agentId, null, PersistenceManager.SaveToGZip(operatorGraph)); 56 OperatorGraph opGraph = new OperatorGraph(); 57 opGraph.AddOperator(op); 58 opGraph.InitialOperator = op; 59 long id = database.InsertAgent(agentId, null, PersistenceManager.SaveToGZip(opGraph)); 57 60 database.UpdateAgent(id, ProcessStatus.Waiting); 58 61 }
Note: See TracChangeset
for help on using the changeset viewer.