File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import dayjs from "dayjs";
4
4
import { insertTransactionRows } from "../utils/wrappa/postgres/write" ;
5
5
import { getBridgeID } from "../utils/wrappa/postgres/query" ;
6
6
import { sql } from "../utils/db" ;
7
- import { getCache , setCache } from "../utils/cache" ;
8
- const LATEST_INSERTED_TS_KEY = "latest_inserted_ts_hyperlane" ;
9
7
10
8
export const handler = async ( ) => {
11
9
try {
@@ -19,7 +17,7 @@ export const handler = async () => {
19
17
)
20
18
) ;
21
19
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 ( ) ;
23
21
const endTs = dayjs ( ) . unix ( ) ;
24
22
25
23
while ( startTs < endTs ) {
@@ -44,13 +42,11 @@ export const handler = async () => {
44
42
await sql . begin ( async ( sql ) => {
45
43
await insertTransactionRows ( sql , true , transactions , "upsert" ) ;
46
44
} ) ;
47
- await setCache ( LATEST_INSERTED_TS_KEY , startTs ) ;
48
45
console . log ( `Inserted ${ transactions . length } transactions for ${ startTs } to ${ endTs } ` ) ;
49
46
}
50
47
} catch ( error ) {
51
48
console . error ( error ) ;
52
49
throw error ;
53
50
}
54
51
} ;
55
-
56
52
export default handler ;
You can’t perform that action at this time.
0 commit comments