code: func (b *Backend) updateState(taskState *tasks.TaskState) error {
  	conn := b.open()
  	defer conn.Close()
  
  	encoded, err := json.Marshal(taskState)
  	if err != nil {
  		return err
  	}
  
  	_, err = conn.Do("SET", taskState.TaskUUID, encoded)
  	if err != nil {
  		return err
  	}
  
  	return b.setExpirationTime(taskState.TaskUUID)
  }
docs: // updateState saves current task state