Skip to content

Conversation

codders
Copy link

@codders codders commented Sep 19, 2023

No description provided.

colinemondswieprecht and others added 6 commits September 7, 2023 14:43
Make GMapsDurationProcessor export unformatted data as
well, to enable later steps in the pipeline (such as filters) to
access and process this data.
You can't re-open a NamedTemporaryFile on Windows while it's still open.
This PR involves some refactoring. The problem is that previously,
filters ran before making any calls to external APIs. Therefore, just
adding another filter for the distance doesn't actually work: the
distance information is not yet available when we apply the filters. We
can't just run the filters later, because then we would run the Google
Maps API calls before we filtered out any properties, meaning that we
would incur Google Maps API calls for all properties that we find in our
search, including those that we later filter out anyway based on price,
size, etc. - and we actually have to pay for those requests! My solution
is to group the filters in two chains, and then run one chain before and
one after external API calls have been made. This way, we can run the
distance filter after the API calls are made, but keep everything else
the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants