Module: Roby::TaskStructure::ExecutionAgentSpawn
- Included in:
- Plan
- Defined in:
- lib/roby/relations/executed_by.rb
Overview
This module is included in Roby::Plan to automatically add execution agents to tasks that require it and are discovered in the executable plan.
Instance Method Summary collapse
-
#discovered_tasks(tasks) ⇒ Object
Hook into plan discovery to add execution agents to new tasks.
Instance Method Details
#discovered_tasks(tasks) ⇒ Object
Hook into plan discovery to add execution agents to new tasks. See ExecutionAgentSpawn.spawn
176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/roby/relations/executed_by.rb', line 176 def discovered_tasks(tasks) # For now, settle on adding the execution agents only in the # main plan. Otherwise, it is possible that two transactions # will try to add two different agents # # Note that it would be solved by plan merging ... return unless executable? for task in tasks if !task.execution_agent && task.model.execution_agent && task.self_owned? ExecutionAgent.spawn(task) end end end |