Skip to content

Commit

Permalink
store recorded blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtnd committed Jun 18, 2024
1 parent 8f47b80 commit 1886c3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/handlers/runAllAdapters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { wrapScheduledLambda } from "../utils/wrap";
import bridgeNetworks from "../data/bridgeNetworkData";
import aws from "aws-sdk";
import { sql } from "../utils/db";
import { store } from "../utils/s3";

async function invokeLambda(functioName: string, event: any) {
return new Promise((resolve, _reject) => {
Expand All @@ -27,6 +28,11 @@ export default wrapScheduledLambda(async (_event) => {
GROUP BY bridge_id
) subquery;
`;
try {
await store("lastRecordedBlocks.json", lastRecordedBlocks[0].result);
} catch (e) {
console.error(e);
}
for (let i = 0; i < bridgeNetworks.length; i++) {
await invokeLambda(`llama-bridges-prod-runAdapter`, {
bridgeIndex: i,
Expand Down

0 comments on commit 1886c3c

Please sign in to comment.