commercetools / commercetools/sphere-node-sdk

Change default for process accumulate option

Open
#252 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.