Free cookie consent management tool by TermsFeed Policy Generator

Changeset 490 for trunk


Ignore:
Timestamp:
08/11/08 00:49:59 (16 years ago)
Author:
gkronber
Message:

small improvement to improve interoperability with the Metaprogramming plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Operators/OnGridProcessor.cs

    r403 r490  
    3838      : base() {
    3939      AddVariableInfo(new VariableInfo("AgentId", "Id of the agent that the run should be associated to.", typeof(IntData), VariableKind.In));
    40       AddVariableInfo(new VariableInfo("OperatorGraph", "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));
    4141      AddVariableInfo(new VariableInfo("CedmaServerUri", "Uri of the CEDMA server", typeof(StringData), VariableKind.In));
    4242    }
    4343
    4444    public override IOperation Apply(IScope scope) {
    45       IOperatorGraph operatorGraph = scope.GetVariableValue<IOperatorGraph>("OperatorGraph", false);
     45      IOperator op = scope.GetVariableValue<IOperator>("Operator", true);
    4646      string serverUrl = scope.GetVariableValue<StringData>("CedmaServerUri", true).Data;
    4747      long agentId = scope.GetVariableValue<IntData>("AgentId", true).Data;
     
    5454      using(ChannelFactory<IDatabase> factory = new ChannelFactory<IDatabase>(binding)) {
    5555        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));
    5760        database.UpdateAgent(id, ProcessStatus.Waiting);
    5861      }
Note: See TracChangeset for help on using the changeset viewer.