commercetools / commercetools/sphere-node-sdk
Change default for process accumulate option
- Dominant language
- CoffeeScript
- Stars
- 16
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
### Description
For processing paged results we have very helpful function called `process`. Currently it's default setting for `accumulate` results is `true` which depending on amount of pages and data callback function produces, might lead to unpredictable memory consumption. Because of that on every usage we have to explicitly override defaults with `process(myCallbackFn, { accumulate: false })`.
### Expected Behavior
Default for [accumulate](https://github.com/sphereio/sphere-node-sdk/blob/master/src/coffee/services/base.coffee#L372) should be `false`
### Current Behavior
Default for [accumulate](https://github.com/sphereio/sphere-node-sdk/blob/master/src/coffee/services/base.coffee#L372) is `true`
Contributor guide
Assessment
This issue has not been assessed yet.