Skip to content

Commit e4d163e

Browse files
committed
optimize adapters schedule
1 parent 91ff94e commit e4d163e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ functions:
142142
timeout: 900
143143
memorySize: 10240
144144
events:
145-
- schedule: cron(32 * * * ? *)
145+
- schedule: cron(10 * * * ? *)
146146
checkStaleBridges:
147147
handler: src/handlers/checkStaleBridges.default
148148
timeout: 600
@@ -158,7 +158,7 @@ functions:
158158
timeout: 900
159159
memorySize: 1024
160160
events:
161-
- schedule: cron(0 * * * ? *)
161+
- schedule: cron(0,15,30,45 * * * ? *)
162162
runAdapterByName:
163163
handler: src/handlers/runAdapterByName.default
164164
timeout: 900

src/handlers/runAllAdaptersHistorical.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function invokeLambda(functionName: string, event: any) {
2525
const handler = async (_event: any) => {
2626
await closeIdleConnections();
2727
const now = Math.floor(Date.now() / 1000);
28-
const fourHoursAgo = now - 60 * 60 * 4;
28+
const fourHoursAgo = now - 60 * 60;
2929

3030
for (const bridge of bridgeNetworks) {
3131
await invokeLambda("llama-bridges-prod-runAdapterFromTo", {

0 commit comments

Comments
 (0)