Factored out common logic between twitter stream tasks.