'Update the state of the given WorkItem.
Args:
item: A WorkItem instance.'

def UpdateProgress(self, item):

    self.db.UpdateState(item.progress_key, item.state)
    if (item.state == STATE_SENT):
        self.entities_transferred += item.count
