def run_pipeline(self, pipeline, *args, **kwargs):
require_slots_filled = kwargs.pop('<STR_LIT>', True)<EOL>task_retry = kwargs.pop('<STR_LIT>', True)<EOL>pipeline.task_retry = task_retry<EOL>pipeline.start(*args, **kwargs)<EOL>while True:<EOL><INDENT>task_list = self.get_tasks()<EOL>if not task_list:<EOL><INDENT>break<EOL><DEDENT>for task in task_list:<EOL><INDENT>self.run_task(task)<EOL>delete_tasks([task])<EOL><DEDENT><DEDENT>if require_slots_filled:<EOL><INDENT>for slot_record in _SlotRecord.all():<EOL><INDENT>self.assertEquals(_SlotRecord.FILLED, slot_record.status,<EOL>'<STR_LIT>' % slot_record.key())<EOL><DEDENT>for barrier_record in _BarrierRecord.all():<EOL><INDENT>self.assertEquals(_BarrierRecord.FIRED, barrier_record.status,<EOL>'<STR_LIT>' % barrier_record.key())<EOL><DEDENT>for pipeline_record in _PipelineRecord.all():<EOL><INDENT>self.assertEquals(_PipelineRecord.DONE, pipeline_record.status,<EOL>'<STR_LIT>' % pipeline_record.key())<EOL><DEDENT><DEDENT>return pipeline.__class__.from_id(pipeline.pipeline_id).outputs<EOL>
Runs the pipeline and returns outputs.