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/scripts | |
parent | ac971685b32328fb0e99715c0dde2a10fdf3158a (diff) | |
download | dexon-0x-contracts-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.gz dexon-0x-contracts-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.tar.zst dexon-0x-contracts-8b3b4d983f0f942fc4e42365d4cfcaf793d1d283.zip |
rename variable and define default in only 1 location
Diffstat (limited to 'packages/pipeline/src/scripts')
-rw-r--r-- | packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts b/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts index 7377a64d8..a29a13bfc 100644 --- a/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts +++ b/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts @@ -11,7 +11,7 @@ import { fetchOHLCVTradingPairsAsync, TradingPair } from '../utils/get_ohlcv_tra const SOURCE_NAME = 'CryptoCompare'; const TWO_HOURS_AGO = new Date().getTime() - 2 * 60 * 60 * 1000; // tslint:disable-line:custom-no-magic-numbers -const MAX_CONCURRENT_REQUESTS = parseInt(process.env.CRYPTOCOMPARE_MAX_CONCURRENT_REQUESTS || '14', 10); // tslint:disable-line:custom-no-magic-numbers +const MAX_REQS_PER_SECOND = parseInt(process.env.CRYPTOCOMPARE_MAX_REQS_PER_SECOND || '15', 10); // tslint:disable-line:custom-no-magic-numbers const EARLIEST_BACKFILL_DATE = process.env.OHLCV_EARLIEST_BACKFILL_DATE || '2014-06-01'; const EARLIEST_BACKFILL_TIME = new Date(EARLIEST_BACKFILL_DATE).getTime(); @@ -20,7 +20,7 @@ let connection: Connection; (async () => { connection = await createConnection(ormConfig as ConnectionOptions); const repository = connection.getRepository(OHLCVExternal); - const source = new CryptoCompareOHLCVSource(MAX_CONCURRENT_REQUESTS); + const source = new CryptoCompareOHLCVSource(MAX_REQS_PER_SECOND); const jobTime = new Date().getTime(); const tradingPairs = await fetchOHLCVTradingPairsAsync(connection, SOURCE_NAME, EARLIEST_BACKFILL_TIME); |