def execute(self):
        self.start = time.time()
        worker = RunnerWorker(self, self.process, self.done, self.timeout)
        renderer = get_renderer(self)
        worker.start()

        while worker.is_alive():
            renderer.render()
            time.sleep(1)

        self.end = time.time()
        renderer.render_final_result()
Exemplo n.º 2
0
    def execute(self):
        renderer = get_renderer(self)
        to_run = self.tasks[:]
        while (len(to_run) > 0 or len(self.running) > 0 or len(self.waiting) > 0) and not self.is_end_time():
            if len(to_run) > 0 and len(self.running) + len(self.waiting) < GRID5K_MAX_NODE:
                task = to_run.pop()
                if task.bug is not None:
                    self.start_task(task)
            time.sleep(1)
            renderer.render()
            self.get_running()

        renderer.render_final_result()
Exemplo n.º 3
0
    def execute(self):
        worker = RunnerWorker(self, self.repair_done)
        renderer = get_renderer(self)
        worker.start()

        while worker.is_alive():
            if self.is_end_time():
                # kill thread
                pass
            renderer.render()
            time.sleep(1)

        renderer.render_final_result()