def process_threads()

in workflows-generator/ComposerDagGenerator.py [0:0]


    def process_threads(self, threads, level_id):
        """method to process threads"""
        thread_bodies = []
        for index, thread in enumerate(threads):
            thread_body = self.thread_template.replace("{LEVEL_ID}", level_id)
            thread_body = thread_body.replace("{THREAD_ID}", thread.get("THREAD_ID"))
            steps = self.process_steps(thread.get("STEPS"), level_id, thread.get("THREAD_ID"))
            thread_body = thread_body.replace("<<THREAD_STEPS>>", "".join(steps))
            thread_body = thread_body.replace("<<THREAD_STEPS_DEPENDENCIES>>",
                                              self.get_steps_dependency_string(thread.get("STEPS")))
            thread_bodies.append(thread_body)
        return thread_bodies