Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Apr 28, 2022
1 parent 220b9f4 commit 5ca136f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions chains/chainApis.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import _ from "lodash"

const BEST_NODE_COUNT = 2
const BEST_HEIGHT_DIFF = 5
const BEST_RESPONSE_DIFF = 1
const BEST_ERROR_DIFF = 5 * 60
const IGNORE_ERROR_DIFF = 60 * 60

function ChainApis(apis, health) {
function bestAddress(type) {
const urls = bestUrls(type)//.slice(0, BEST_NODE_COUNT)
const urls = bestUrls(type)
const best = _.sample(urls)
return best && best.address
}
Expand Down
3 changes: 2 additions & 1 deletion ecosystem.production.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "app",
"script": "app.js",
"instances": 5,
"cron_restart": "0 */3 * * *"
"cron_restart": "0 */3 * * *",
"max_memory_restart": "200M"
}, {
"name": "worker",
"script": "worker.js",
Expand Down
1 change: 1 addition & 0 deletions proxy/proxyController.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ const ProxyController = (client, registry) => {
resolve()
})

// Causes major memory leak
// proxy.on('proxyRes', (proxyRes, req, res) => {
// proxyRes.headers["x-forwarded-to"] = ctx.state.proxyUrl;
// });
Expand Down

0 comments on commit 5ca136f

Please sign in to comment.