

def fill_in_job(self, job):
    obj_info = None
    if (job['type'] == ssbench.DELETE_OBJECT):
        try:
            obj_info = self.objs_by_size[job['size_str']].popleft()
        except IndexError:
            return None
    elif (job['type'] != ssbench.CREATE_OBJECT):
        try:
            obj_info = self.objs_by_size[job['size_str']][0]
            self.objs_by_size[job['size_str']].rotate((- 1))
        except IndexError:
            return None
    if obj_info:
        (job['container'], job['name'], _) = obj_info
    return job

dataset/ETHPy150Open swiftstack/ssbench/ssbench/run_state.py RunState.fill_in_job/original