From 442ffb1618605b0dc059527f35c2380a166cfbca Mon Sep 17 00:00:00 2001 From: Habib Alkhabbaz <31035020+habibalkhabbaz@users.noreply.github.com> Date: Thu, 18 Aug 2022 21:37:33 +0300 Subject: [PATCH] fix: remove duplicate code which exists in #478 --- app/binance/__tests__/candles.test.js | 12 ------------ app/binance/candles.js | 3 --- 2 files changed, 15 deletions(-) diff --git a/app/binance/__tests__/candles.test.js b/app/binance/__tests__/candles.test.js index ce1c5a77..77334ad4 100644 --- a/app/binance/__tests__/candles.test.js +++ b/app/binance/__tests__/candles.test.js @@ -5,8 +5,6 @@ describe('candles.js', () => { let loggerMock; let mongoMock; - let mockQueue; - let mockGetConfiguration; let mockSaveCandle; @@ -55,12 +53,6 @@ describe('candles.js', () => { return mockWebsocketCandlesClean; }); - mockQueue = { - executeFor: jest.fn().mockResolvedValue(true) - }; - - jest.mock('../../cronjob/trailingTradeHelper/queue', () => mockQueue); - jest.mock('../../cronjob/trailingTradeHelper/common', () => ({ saveCandle: mockSaveCandle })); @@ -234,9 +226,5 @@ describe('candles.js', () => { ] ); }); - - it('triggers queue.executeFor for ETHBTC', () => { - expect(mockQueue.executeFor).toHaveBeenCalledWith(loggerMock, 'ETHBTC'); - }); }); }); diff --git a/app/binance/candles.js b/app/binance/candles.js index 3b1c4fa5..1f7fa81d 100644 --- a/app/binance/candles.js +++ b/app/binance/candles.js @@ -1,5 +1,4 @@ const _ = require('lodash'); -const queue = require('../cronjob/trailingTradeHelper/queue'); const { binance, mongo } = require('../helpers'); const { getConfiguration @@ -111,8 +110,6 @@ const syncCandles = async (logger, symbols) => { })); await mongo.bulkWrite(logger, 'trailing-trade-candles', operations); - - queue.executeFor(logger, symbol); }; return getCandles();