Commit d0e7c6fa by ken

试试看

parent 51d37d9a
...@@ -5,8 +5,8 @@ const request = require('request'); ...@@ -5,8 +5,8 @@ const request = require('request');
const crypto = require('ezcrypto').Crypto; const crypto = require('ezcrypto').Crypto;
const ips = require("./util").allIps; const ips = require("./util").allIps;
const options = {}; const options = {};
const observerSymbol = ["btcusdt", 'ethusdt', 'ethbtc', "eosbtc", "eosusdt", 'bccusdt', "bccbtc"]; // const observerSymbol = ["btcusdt", 'ethusdt', 'ethbtc', "eosbtc", "eosusdt", 'bccusdt', "bccbtc"];
// const observerSymbol = ["btcusdt", 'bccusdt', "bccbtc"]; const observerSymbol = ["btcusdt", 'bccusdt', "bccbtc"];
const redis = require('redis'); const redis = require('redis');
const redisClient = redis.createClient(); const redisClient = redis.createClient();
const publishKey = "ZB@2"; const publishKey = "ZB@2";
...@@ -220,7 +220,7 @@ function getBalanceByRest() { ...@@ -220,7 +220,7 @@ function getBalanceByRest() {
function run() { function run() {
subscribe(); subscribe();
const depthInterval = Math.max(60 * 1000 / (850 * ips.length / observerSymbol.length), 300); const depthInterval = Math.max(60 * 1000 / (850 * 1 / observerSymbol.length), 300);
console.log(depthInterval); console.log(depthInterval);
setInterval(() => { setInterval(() => {
for (const symbol of observerSymbol) { for (const symbol of observerSymbol) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment