def translateLog(_log): def update_item_execs(old_obj, translate_dict): new_item_execs = [] for obj in old_obj.db_items: if obj.vtType == 'module_exec': new_item_execs.append(DBModuleExec.update_version(obj, translate_dict)) elif obj.vtType == 'group_exec': new_item_execs.append(DBGroupExec.update_version(obj, translate_dict)) elif obj.vtType == 'loop_exec': new_item_execs.append(DBLoopExec.update_version(obj, translate_dict)) return new_item_execs translate_dict = {'DBWorkflowExec': {'item_execs': update_item_execs}} log = DBLog.update_version(_log, translate_dict) log.db_version = '1.0.0' return log
def translateLog(_log): def update_item_execs(old_obj, translate_dict): new_item_execs = [] for obj in old_obj.db_items: if obj.vtType == 'module_exec': new_item_execs.append( DBModuleExec.update_version(obj, translate_dict)) elif obj.vtType == 'group_exec': new_item_execs.append( DBGroupExec.update_version(obj, translate_dict)) elif obj.vtType == 'loop_exec': new_item_execs.append( DBLoopExec.update_version(obj, translate_dict)) return new_item_execs translate_dict = {'DBWorkflowExec': {'item_execs': update_item_execs}} log = DBLog.update_version(_log, translate_dict) log.db_version = '1.0.0' return log
def translateLog(_log): translate_dict = {} log = DBLog.update_version(_log, translate_dict) log.db_version = '1.0.0' return log