def apply(tr, change, changeid): # apply change to vnstore vnstore.change_apply(tr, changeid) # mark the change as applied change.status = ChangeRequest.STATUS_APPLIED change.save() # apply changes to snapshot changes = vnstore._tuples.FROM(tr, var('uid'), var('key'), var('value'), var('alive'), changeid) for change in changes: if change['alive']: op = nstore.add else: op = nstore.delete op(tr, change['uid'], change['key'], change['value'])
def apply(tr, change, changeid): # apply change to vnstore vnstore.change_apply(tr, changeid) # mark the change as applied change.status = ChangeRequest.STATUS_APPLIED change.save()