Skip to content

Commit 4575d04

Browse files
committed
rmv hyperlane cache
1 parent f4acd96 commit 4575d04

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/handlers/runHyperlane.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import dayjs from "dayjs";
44
import { insertTransactionRows } from "../utils/wrappa/postgres/write";
55
import { getBridgeID } from "../utils/wrappa/postgres/query";
66
import { sql } from "../utils/db";
7-
import { getCache, setCache } from "../utils/cache";
8-
const LATEST_INSERTED_TS_KEY = "latest_inserted_ts_hyperlane";
97

108
export const handler = async () => {
119
try {
@@ -19,7 +17,7 @@ export const handler = async () => {
1917
)
2018
);
2119
console.log(bridgeIds);
22-
let startTs = (await getCache(LATEST_INSERTED_TS_KEY)) || dayjs().subtract(48, "hour").unix();
20+
let startTs = dayjs().subtract(48, "hours").unix();
2321
const endTs = dayjs().unix();
2422

2523
while (startTs < endTs) {
@@ -44,13 +42,11 @@ export const handler = async () => {
4442
await sql.begin(async (sql) => {
4543
await insertTransactionRows(sql, true, transactions, "upsert");
4644
});
47-
await setCache(LATEST_INSERTED_TS_KEY, startTs);
4845
console.log(`Inserted ${transactions.length} transactions for ${startTs} to ${endTs}`);
4946
}
5047
} catch (error) {
5148
console.error(error);
5249
throw error;
5350
}
5451
};
55-
5652
export default handler;

0 commit comments

Comments
 (0)