Skip to content

Conversation

@mrfelton
Copy link

Initial concept for a helper that automatically batches contacts into sets of 1500 and throttles the API usage to a maximum throughput of 3 requests per 2 seconds (the limit imposed by SendGrid). Results of each batch import are emitted as an event containing details of the batch (the contacts that were uploaded and the results of upload).

Addresses #273.

Note, this patch builds on work done in #275.

@mrfelton mrfelton force-pushed the tkp/contact-importer branch from 162b6e2 to 1dc832b Compare August 22, 2016 12:17
})


// assert.equal(sg.limiters['/v3/contactdb/recipients'].queue.length, 2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrfelton commented code in test

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: cla needed and removed status: cla needed labels Aug 22, 2016
@thinkingserious
Copy link
Contributor

Hi @mrfelton,

Is this one ready for review to merge?

@mrfelton
Copy link
Author

@thinkingserious yes, we're using this helper class in production. It could probably do with some more unit tests, but it does it's thing. I just successfully used it to import 199,713 contacts into a Sendgrid account.

@thinkingserious
Copy link
Contributor

Hi @mrfelton,

Now that I've merged #277, I was looking to merge this one. I noticed that there is some overlapping code though. I'm not sure if I should have not merged #277 in favor of this one. Could you please take a look and let me know what you think? Thanks!

@mrfelton
Copy link
Author

@thinkingserious the changes in this PR were built ontop of the other one. It should apply cleanly ontop of it.

@thinkingserious thinkingserious merged commit 25623f6 into sendgrid:master Sep 15, 2016
@thinkingserious
Copy link
Contributor

Can you please send us your mailing address and T-shirt size to [email protected]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: community enhancement feature request not on Twilio's roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants