diff options
| author | Adam Soltys <[email protected]> | 2023-01-08 21:05:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-08 21:05:34 -0800 |
| commit | dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7 (patch) | |
| tree | 6c6b8930ebe9c2cc5b8d1f759e61260f509fdd7a /lib/rates.js | |
| parent | f7b844883506a8072213245b9b8a2b988694e4f5 (diff) | |
| download | coinos-server-dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7.tar.gz coinos-server-dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7.zip | |
tech debt jubilee
Diffstat (limited to 'lib/rates.js')
| -rw-r--r-- | lib/rates.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rates.js b/lib/rates.js index e896c8cc..8970ca64 100644 --- a/lib/rates.js +++ b/lib/rates.js @@ -2,19 +2,18 @@ import app from "$app"; import axios from "axios"; import config from "$config"; import fs from "fs"; -import binance from "./binance"; +// import binance from "./binance"; import { broadcast } from "./sockets"; import store from "./store"; import { err, warn } from "$lib/logging"; -let b = binance(); -setInterval(() => { - b.terminate(); - b = binance(); -}, 360000); +// let b = binance(); +// setInterval(() => { +// b.terminate(); +// b = binance(); +// }, 360000); -let fetchRates; -(fetchRates = async () => { +let fetchRates = async () => { let date, fx; try { @@ -58,7 +57,8 @@ let fetchRates; store.fx = fx; setTimeout(fetchRates, 7200000); -})(); +}; +// fetchRates(); app.get("/rate", async (req, res, next) => { res.send(store.last); |
