def run_once(self, **kwargs):
        tasks = self.get_tasks()
        # This is done to make sure we submit one task per node until we've
        # submitted all the tasks.  This helps ensure we don't hammer a
        # single node with monitoring tasks
        while True:
            working_index = tasks.keys()
            if not working_index:
                break
            for node in working_index:
                try:
                    task_context = tasks[node].pop()
                    task_id = self.task_id_template.format(**task_context)
                    task = Task({
                        'id': task_id,
                        'context': task_context})
                except __HOLE__:
                    del(tasks[node])
                    continue
                self.submit_task(task, **kwargs)
dataset/ETHPy150Open cloudtools/nymms/nymms/scheduler/Scheduler.py/Scheduler.run_once