Skip to content

Commit

Permalink
feat: comment some code for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
serezhaolshan committed Jul 9, 2024
1 parent fa0f6dc commit 502e8fb
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,30 @@ async function main() {
setupRoutes(app, container);
console.log("Routes are set up");

const watcherService = container.resolve(WatcherService);
console.log("Watcher service resolved");
const explorerService = container.resolve(ExplorerService);
console.log("Explorer service resolved");
await explorerService.initService();
console.log("Explorer service initiated");
// const watcherService = container.resolve(WatcherService);
// console.log("Watcher service resolved");
// const explorerService = container.resolve(ExplorerService);
// console.log("Explorer service resolved");
// await explorerService.initService();
// console.log("Explorer service initiated");

const cgPriceWatcher = container.resolve(CgPriceWatcher);
const apiPriceWatcher = container.resolve(ApiPriceWatcher);
const priceWatcher = container.resolve(PriceWatcher);
// const apiPriceWatcher = container.resolve(ApiPriceWatcher);
// const priceWatcher = container.resolve(PriceWatcher);

// Run deleteWatchersWithStaleData every 24 hours for check and delete stale data
setInterval(
async () => await watcherService.deleteWatchersWithStaleData(),
ONE_DAY_IN_MS
);
// setInterval(
// async () => await watcherService.deleteWatchersWithStaleData(),
// ONE_DAY_IN_MS
// );
console.log("Watchers with stale data deleted");

await Promise.all([
cgPriceWatcher.run(),
apiPriceWatcher.run(),
watcherService.subscribeToExplorer(),
explorerService.checkService(),
priceWatcher.run()
// apiPriceWatcher.run(),
// watcherService.subscribeToExplorer(),
// explorerService.checkService(),
// priceWatcher.run()
]);

app.listen(appPort, () => {
Expand Down

0 comments on commit 502e8fb

Please sign in to comment.