-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Waiting on #174] WIP - Add rake task to sync items with Amazon #175
Open
leesharma
wants to merge
8
commits into
rubyforgood:master
Choose a base branch
from
leesharma:items-sync
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Nov 29, 2017
-
I'm pretty torn on this commit-an abstract superclass doesn't seem like a very ruby thing to do. Maybe I've been doing too much Java? There are two main goals of this commit: 1. It should be trivial to add new endpoints. We're going to have to add a few more, and being able to customize only the specialized bits will save a ton of time and prevent bugs. 2. Shared code should exist in one location. Already, we've got a bug in our signing process, and keeping this all in a superclass means we only need to fix it in one place. I don't like how I'm handling `@aws_credentials` at the moment (requiring each subclass to initialize it); any ideas of a better way to handle it?
Configuration menu - View commit details
-
Copy full SHA for 7450a60 - Browse repository at this point
Copy the full SHA 7450a60View commit details -
Since the instructions are getting more complicated, this commit adds a README (with new endpoint instructions) to the Amazon Product API. This has three benefits: * It keeps the root README clean and relevant to most people. * It allows us to go into more documentation detail. * It facilitates an eventual extraction of the Amazon Product API lib. It might be worth extracting more from the "Getting Amazon Product Advertising API Working Locally" section into the lib README, but for now there's just endpoint information.
Configuration menu - View commit details
-
Copy full SHA for 4cd254a - Browse repository at this point
Copy the full SHA 4cd254aView commit details -
Only load AWS test credentials once
Whenever the tests run, the following error appeared: warning: already initialized constant AWSTestCredentials This moves the AWSTestCredentials init from the individual specs to a spec helper class: `spec/support/helpers/amazon_helpers.rb`.
Configuration menu - View commit details
-
Copy full SHA for 3b0bb6a - Browse repository at this point
Copy the full SHA 3b0bb6aView commit details -
`rake items:sync` will sync all items in the database. Some chunking was done in `ItemSyncJob` in order to get around Amazon's rate limitations. TODO: * Batch the Amazon query (ItemLookup can take up to 10 ASINs) * Add a delayed job queue (new issue?) * Add specs
Configuration menu - View commit details
-
Copy full SHA for fd43cfc - Browse repository at this point
Copy the full SHA fd43cfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07a6d62 - Browse repository at this point
Copy the full SHA 07a6d62View commit details -
A couple notes: 1. I added a new exception to rubocop to allow for the `expect { action_a }.to change { dynamic_attr }` form. 2. The 2 sec Amazon rate limit delay doesn't apply to tests. All tests are green and no new rubocop violations are added.
Configuration menu - View commit details
-
Copy full SHA for 85757bd - Browse repository at this point
Copy the full SHA 85757bdView commit details -
Item lookup endpoint supports up to 10 ASINs
As a first step for batching the requests, this commit makes the client endpoint take a list of asins instead of just an individual one. Other files are changed in order to work with the new interface (asins -> items) Next up: bulk-searching with the items sync job!
Configuration menu - View commit details
-
Copy full SHA for 1229548 - Browse repository at this point
Copy the full SHA 1229548View commit details -
This commit takes advantage of the multi-asin item lookup requests and performs the item sync job in batches of 10.
Configuration menu - View commit details
-
Copy full SHA for 3da732f - Browse repository at this point
Copy the full SHA 3da732fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.