From aa8d96fc8e6cdfde8b0f2d40d2c642bd09566365 Mon Sep 17 00:00:00 2001 From: vega Date: Fri, 17 Jun 2022 16:20:32 -0400 Subject: [PATCH] launch json --- .vscode/launch.json | 30 ++++++++++++++++++++++++++++++ src/liquidate.ts | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d622e8d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,30 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "liquidate", + "type": "node", + "request": "launch", + "args": [ + "${workspaceRoot}/src/liquidate.ts", + ], + "runtimeArgs": [ + "-r", + "ts-node/register", + "-r", + "tsconfig-paths/register" + ], + "cwd": "${workspaceRoot}", + "internalConsoleOptions": "openOnSessionStart", + "runtimeExecutable": "/usr/local/bin/node", + "outputCapture": "std", + "env": { + "APP": "production", + "THROTTLE": "1000" + } + }, + ] +} \ No newline at end of file diff --git a/src/liquidate.ts b/src/liquidate.ts index 0bbfa9a..c4e57a2 100644 --- a/src/liquidate.ts +++ b/src/liquidate.ts @@ -124,7 +124,7 @@ async function runLiquidator() { // Throttle to avoid rate limiter if (process.env.THROTTLE) { - await wait(process.env.THROTTLE); + await wait(Number(process.env.THROTTLE)); } } }