Skip to content

Commit ed17f15

Browse files
committed
Fetch kda price: gateio disabled
Disabled gateio api for fecthing kda price
1 parent 812d7cb commit ed17f15

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

dextools-cron/src/kdaPriceUpdate.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@ const kdaPriceUpdate = async () => {
4545
currMinute.setMilliseconds(0);
4646

4747
let done = false;
48-
while (retryTimes < 5) {
49-
try {
50-
console.log('getting kda price');
51-
const kdaPrice = await getLatestFromGate();
52-
console.log('price is ' + kdaPrice);
53-
const values = [currMinute, kdaPrice];
54-
console.log(`adding values to postgres, ${currMinute}`);
55-
await client.query(insertQuery, values);
56-
done = true;
57-
console.log(`added`);
58-
break;
59-
} catch (e) {
60-
console.log(e);
61-
retryTimes += 1;
62-
await new Promise((r) => setTimeout(r, 1000));
63-
console.log('FAILED TO UPDATEe, RETRYING ' + retryTimes + ' times');
64-
}
65-
}
48+
// while (retryTimes < 5) {
49+
// try {
50+
// console.log('getting kda price');
51+
// const kdaPrice = await getLatestFromGate();
52+
// console.log('price is ' + kdaPrice);
53+
// const values = [currMinute, kdaPrice];
54+
// console.log(`adding values to postgres, ${currMinute}`);
55+
// await client.query(insertQuery, values);
56+
// done = true;
57+
// console.log(`added`);
58+
// break;
59+
// } catch (e) {
60+
// console.log(e);
61+
// retryTimes += 1;
62+
// await new Promise((r) => setTimeout(r, 1000));
63+
// console.log('FAILED TO UPDATEe, RETRYING ' + retryTimes + ' times');
64+
// }
65+
// }
6666

6767
if (!done) {
6868
while (retryTimes < 10) {

0 commit comments

Comments
 (0)