Skip to content

Commit

Permalink
feat: Use V2 endpoint to calculate social lag metric (#344)
Browse files Browse the repository at this point in the history
I've created a new env var because updating the existing would cause the
Lambdas to start writing to V2. Will add the following env variables to
GitHub so they are picked up in the action:
- `LAMBDA_DEV:HASURA_ENDPOINT_V2` -
https://queryapi-hasura-graphql-mainnet-vcqilefdcq-ew.a.run.app/
- `LAMBDA_PROD:HASURA_ENDPOINT_V2` -
https://queryapi-hasura-graphql-mainnet-24ktefolwq-ew.a.run.app/

Resolves #343
  • Loading branch information
morgsmccauley committed Oct 31, 2023
1 parent 338ee31 commit f3f28f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions indexer-js-queue-handler/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ provider:
REGION: ${self:provider.region}
STAGE: ${opt:stage, 'dev'}
HASURA_ENDPOINT: ${env:HASURA_ENDPOINT}
HASURA_ENDPOINT_V2: ${env:HASURA_ENDPOINT_V2}
HASURA_ADMIN_SECRET: ${env:HASURA_ADMIN_SECRET}
PG_ADMIN_USER: ${env:PG_ADMIN_USER}
PG_ADMIN_PASSWORD: ${env:PG_ADMIN_PASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion indexer-js-queue-handler/social-lag-metrics-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const handler = async () => {
},
}),
fetchJson(
`${process.env.HASURA_ENDPOINT}/v1/graphql`,
`${process.env.HASURA_ENDPOINT_V2}/v1/graphql`,
{
query: `{
dataplatform_near_social_feed_posts(
Expand Down

0 comments on commit f3f28f0

Please sign in to comment.