diff options
author | xianny <xianny@gmail.com> | 2018-12-07 05:20:08 +0800 |
---|---|---|
committer | xianny <xianny@gmail.com> | 2018-12-08 01:43:55 +0800 |
commit | 8b3b4d983f0f942fc4e42365d4cfcaf793d1d283 (patch) | |
tree | 147af18be1aed233c266b554beccf84d4bd51b14 /packages/pipeline/src/data_sources | |
parent | ac971685b32328fb0e99715c0dde2a10fdf3158a (diff) | |
download | dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.gz dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.bz2 dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.lz dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.xz dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.zst dexon-sol-tools-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.zip |
rename variable and define default in only 1 location
Diffstat (limited to 'packages/pipeline/src/data_sources')
-rw-r--r-- | packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts b/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts index e83e3b67d..998ef6bf3 100644 --- a/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts +++ b/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts @@ -49,13 +49,14 @@ export class CryptoCompareOHLCVSource { // rate-limit for all API calls through this class instance private readonly _limiter: Bottleneck; - constructor(maxReqsPerSecond: number = 40) { + constructor(maxReqsPerSecond: number) { this._limiter = new Bottleneck({ - minTime: Math.ceil(ONE_SECOND / maxReqsPerSecond), + minTime: ONE_SECOND / maxReqsPerSecond, reservoir: 2000, reservoirRefreshAmount: 2000, reservoirRefreshInterval: ONE_MINUTE, }); + console.log('mintime', Math.ceil(ONE_SECOND / maxReqsPerSecond)); // tslint:disable-line:no-console } // gets OHLCV records starting from pair.latest |