Closed lennym closed 8 years ago
@@ master #57 diff @@
==========================================
Files 1 1
Lines 153 156 +3
Methods 25 25
Messages 0 0
Branches 29 30 +1
==========================================
+ Hits 153 156 +3
Misses 0 0
Partials 0 0
Powered by Codecov. Last updated by 0ff31a4...12fa1a1
On further thought, we might want to be more explicit and filter items based on the type
property. Since we're really saving packages and articles for reference later, so a type: 'package'
or type: 'tile'
filter might be more appropriate that a slightly arbitrary url filter..
@lennym that would require us to add a type
property to each item that we want to store on S3.
I don't have an objection to doing that but it is more work (in 3 places), whereas your url
filter does the job already.
@nelsonic I think those items have those type properties already as far as I can tell. Happy to merge as is though if you are.
I stand corrected. Tiles and filters have a type property, packages do not.
@lennym you're right, lambda-tile-provider/saveHandler.js#L38 does specify its type
and we can easily add it to the packages...
Let me write a quick PR to update lambda-ne-classic-package-provider
to add type='package'
while
you update this PR to check for that type of content. 👍
@lennym please take a look at: https://github.com/numo-labs/lambda-ne-classic-package-provider/pull/76 does this allow us to perform the more explicit check now in saveRecord
?
@nelsonic Updated to filter based on type
rather than url
.
@jruts what type
of record are you planning on assigning for the records stored by lambda-search-request-handler
for the neo4j
response?
Context:
aws-lambda-helper
save to S3 method will now check for specific types of content before saving see code in this PR.
looks good. let's merge! 👍
We want to be able to send items back into the results pipe to the client without also necessarily saving them to s3 as well. In particular, it does not make sense to save items to s3 which do not url.
As such, we remove items from the items array which have no url property before saving to s3.
Also slightly refactor the tests for this method to more explicitly define the calls to downstream AWS services by stubbing the AWS SDK.