Skip to content

Commit 896aede

Browse files
committed
refactor: file structure
1 parent 4eebd96 commit 896aede

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

apps/insights/src/utils/cache.ts renamed to apps/insights/src/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Cache as ACDCache } from "async-cache-dedupe";
22
import { createCache } from "async-cache-dedupe";
33
import { stringify, parse } from "superjson";
44

5-
import { getRedis } from "../config/server";
5+
import { getRedis } from "./config/server";
66

77
const transformer = {
88
serialize: stringify,
File renamed without changes.

apps/insights/src/server/pyth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { parse } from "superjson";
22
import { z } from "zod";
33

4+
import { DEFAULT_CACHE_TTL } from "../cache";
45
import { VERCEL_REQUEST_HEADERS } from "../config/server";
6+
import { getHost } from "../get-host";
57
import { Cluster, ClusterToName, priceFeedsSchema } from "../services/pyth";
6-
import { DEFAULT_CACHE_TTL } from "../utils/cache";
7-
import { getHost } from "../utils/get-host";
88

99
export async function getPublishersForFeedRequest(
1010
cluster: Cluster,

apps/insights/src/services/clickhouse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import type { ZodSchema, ZodTypeDef } from "zod";
55
import { z } from "zod";
66

77
import { Cluster, ClusterToName } from "./pyth";
8+
import { redisCache } from "../cache";
89
import { CLICKHOUSE } from "../config/server";
9-
import { redisCache } from "../utils/cache";
1010

1111
const client = createClient(CLICKHOUSE);
1212

apps/insights/src/services/pyth/get-feeds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Cluster, priceFeedsSchema } from ".";
22
import { getPythMetadataCached } from "./get-metadata";
3-
import { redisCache } from "../../utils/cache";
3+
import { redisCache } from "../../cache";
44

55
const _getFeeds = async (cluster: Cluster) => {
66
const unfilteredData = await getPythMetadataCached(cluster);

apps/insights/src/services/pyth/get-metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { clients, Cluster } from ".";
2-
import { memoryOnlyCache } from "../../utils/cache";
2+
import { memoryOnlyCache } from "../../cache";
33

44
const getPythMetadata = async (cluster: Cluster) => {
55
return clients[cluster].getData();

apps/insights/src/services/pyth/get-publishers-for-cluster.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Cluster } from ".";
22
import { getPythMetadataCached } from "./get-metadata";
3-
import { redisCache } from "../../utils/cache";
3+
import { redisCache } from "../../cache";
44

55
const _getPublishersForCluster = async (cluster: Cluster) => {
66
const data = await getPythMetadataCached(cluster);

0 commit comments

Comments
 (0)