After that, I am triggering a loop that goes through obtaining user information first and then checking if the user already exists in our data store (it could be that it’s a new user), takes a snapshot of the current basic user information through take_user_snapshot and then triggers an update to the user’s tweet collection that we have stored in our database with update_user_tweets . def update_user_tweets ( user , config , data_connection ): print ( f '[info] Preparing to aggregate tweets for user { user } ...' ) twitter_api = get_twitter_instance ( config ) while True : try : timeline = twitter_api .