Refactor get_quotes so it is a background job