File tree Expand file tree Collapse file tree
indexer/packages/postgres/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ export const DEFAULT_POSTGRES_OPTIONS : Options = config.USE_READ_REPLICA
125125 ? {
126126 readReplica : true ,
127127 } : { } ;
128+ export const USE_MASTER_POSTGRES_OPTIONS : Options = {
129+ readReplica : false ,
130+ } ;
128131
129132// The maximum number of parent subaccounts per address.
130133export const MAX_PARENT_SUBACCOUNTS : number = 128 ;
Original file line number Diff line number Diff line change 11import { logger } from '@dydxprotocol-indexer/base' ;
22import { QueryBuilder } from 'objection' ;
33
4- import { DEFAULT_POSTGRES_OPTIONS } from '../constants' ;
4+ import { DEFAULT_POSTGRES_OPTIONS , USE_MASTER_POSTGRES_OPTIONS } from '../constants' ;
55import { setupBaseQuery , verifyAllRequiredFields } from '../helpers/stores-helpers' ;
66import Transaction from '../helpers/transaction' ;
77import BlockModel from '../models/block-model' ;
@@ -110,7 +110,7 @@ export async function findByBlockHeight(
110110}
111111
112112export async function getLatest (
113- options : Options = DEFAULT_POSTGRES_OPTIONS ,
113+ options : Options = USE_MASTER_POSTGRES_OPTIONS ,
114114) : Promise < BlockFromDatabase > {
115115 const baseQuery : QueryBuilder < BlockModel > = setupBaseQuery < BlockModel > (
116116 BlockModel ,
You can’t perform that action at this time.
0 commit comments