'Update a specified progress record with new information.
Args:
key: The key for this progress record, returned from StoreKeys
new_state: The new state to associate with this progress record.'

def UpdateState(self, key, new_state):

    self._OpenSecondaryConnection()
    assert _RunningInThread(self.secondary_thread)
    assert isinstance(new_state, int)
    self.update_cursor.execute('update    progress    set    state=?    where    id=?', (new_state, key))
    self._MaybeCommit()
