Skip to content
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

don't call Promise.config #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ var redshiftClient = new Redshift(client, {rawConnection: true});
Connection pooling works by default with no extra configuration. [Here's an example of connection pooling](https://github.com/dmanjunath/node-redshift/blob/master/examples/connection_pooling.js)

##### Setup Options
There are two options that can be passed into the options object in the Redshift constructor.

| Option | Type | Description |
| --------------------- |:-------------:| ---------------------------------------------------------------------------------:|
| rawConnection | Boolean | If you want a raw connection, pass true with this option |
| longStackTraces | Boolean | Default: true. If you want to disable [bluebird's longStackTraces](http://bluebirdjs.com/docs/api/promise.longstacktraces.html), pass in false |
The Redshift constructor accepts an option object with the following properties:

| Option | Type | Description |
| --------------------- |:-------------:| ---------------------------------------------------------------------------- |
| rawConnection | Boolean | Default: false. Pass true to use a raw connection. |

## Usage

Expand Down
9 changes: 1 addition & 8 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ var Redshift = function (config, options) {
});
}

// unless there's an option disabling long stack traces, enable long stack traces
if(!options || (options && (options.longStackTraces == undefined || options.longStackTraces === true))){
Promise.config({
longStackTraces: true
});
}

// add additional pg modules to redshift object
that.types = pg.types;
} else {
Expand Down Expand Up @@ -68,4 +61,4 @@ Redshift.prototype.connect = function (callback) {
}
};

module.exports = Redshift;
module.exports = Redshift;