Skip to content

Commit

Permalink
Adds flow control env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
michaloo committed Feb 7, 2018
1 parent c54e11e commit 483f786
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.4.6
- optimize node for memory usage and add flow control env vars

## 0.4.5
- fix batch endpoint by correcting Bottleneck signature

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"admin": "admin.html",
"source": "clearbit",
"readme": "readme.md",
"version": "0.4.5",
"version": "0.4.6",
"private_settings": [
{
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hull-clearbit",
"description": "Enrich Customer data with Clearbit",
"version": "0.4.5",
"version": "0.4.6",
"main": "index.js",
"license": "MIT",
"homepage": "https://github.com/hull-ships/hull-clearbit",
Expand Down Expand Up @@ -51,7 +51,7 @@
"test:modules": "builder run test:modules",
"test:specs": "builder run test:specs",
"test:units": "builder run test:units",
"start": "NODE_ENV=production node -r newrelic ./node_modules/.bin/pm2-runtime --raw lib",
"start": "NODE_ENV=production node --optimize_for_size --max_old_space_size=$MEMORY_AVAILABLE -r newrelic ./node_modules/.bin/pm2-runtime --raw lib",
"dev": "builder run dev",
"test": "builder run npm:test"
},
Expand Down
4 changes: 2 additions & 2 deletions server/handlers/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default function notifyHandler({ hostSecret, stream = false }) {
) => {
smartNotifierResponse.setFlowControl({
type: "next",
size: 200,
in: 100
size: parseInt(process.env.FLOW_CONTROL_SIZE, 10) || 200,
in: parseInt(process.env.FLOW_CONTROL_IN, 10) || 100
});
const clearbit = new Clearbit({
hull: client,
Expand Down

0 comments on commit 483f786

Please sign in to comment.