def state_writer(self):
        while self.server.is_alive():
            # state is not guaranteed accurate, as we do not
            # update the file on every iteration
            gevent.sleep(0.01)

            try:
                job_id, job = self.server.first_job()
            except __HOLE__:
                self.update_state(None, None)
                continue

            self.update_state(job_id, job)
dataset/ETHPy150Open dcramer/taskmaster/src/taskmaster/server.py/Controller.state_writer