Skip to content

Conversation

@takuyan
Copy link
Contributor

@takuyan takuyan commented Mar 7, 2016

Fix for Over 300 leads

params[:asyncProcessing] = async_processing if async_processing
# see also: http://developers.marketo.com/documentation/rest/createupdate-leads/
# > You can update a maximum of 300 leads with a single API call.
leads.each_slice(MAX_LEADS_SIZE).map do |_leads|
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe you should flatten the output to not break the API with a new response type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the output to not break the API

Agree.
But when leads is over 300, we call multiple requests to marketo and receive multiple responses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But...I begin to thought that this method should be keep it simple.

Copy link
Owner

Choose a reason for hiding this comment

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

I see your point that's why I wrote that you should flatten the response, with #flat_map.

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