pub async fn process_changes(state: State, infinite: bool) -> Result<()>