def do_engine_steps(self):
assert not self.read_only<EOL>engine_steps = list(<EOL>[t for t in self.get_tasks(Task.READY)<EOL>if self._is_engine_task(t.task_spec)])<EOL>while engine_steps:<EOL><INDENT>for task in engine_steps:<EOL><INDENT>task.complete()<EOL><DEDENT>engine_steps = list(<EOL>[t for t in self.get_tasks(Task.READY)<EOL>if self._is_engine_task(t.task_spec)])<EOL><DEDENT>
Execute any READY tasks that are engine specific (for example, gateways
or script tasks). This is done in a loop, so it will keep completing
those tasks until there are only READY User tasks, or WAITING tasks
left.