File tree Expand file tree Collapse file tree 2 files changed +7
-21
lines changed
common/src/indexer_service/http Expand file tree Collapse file tree 2 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,7 @@ impl IndexerService {
215215 query_auth_token : options. config . service . free_query_auth_token . clone ( ) ,
216216 } ) ,
217217 DeploymentDetails :: for_query_url_with_token (
218- & options
219- . config
220- . subgraphs
221- . network
222- . config
223- . query_url
224- . to_string ( ) ,
218+ options. config . subgraphs . network . config . query_url . as_ref ( ) ,
225219 options
226220 . config
227221 . subgraphs
@@ -271,13 +265,13 @@ impl IndexerService {
271265 let escrow_subgraph: & ' static SubgraphClient = Box :: leak ( Box :: new ( SubgraphClient :: new (
272266 http_client,
273267 Some ( DeploymentDetails {
274- deployment : options. config . subgraphs . escrow . config . deployment_id . clone ( ) ,
268+ deployment : options. config . subgraphs . escrow . config . deployment_id ,
275269 status_url : Some ( options. config . graph_node . status_url . clone ( ) ) ,
276270 query_url : options. config . graph_node . query_url . clone ( ) ,
277271 query_auth_token : options. config . service . free_query_auth_token . clone ( ) ,
278272 } ) ,
279273 DeploymentDetails :: for_query_url_with_token (
280- & options. config . subgraphs . escrow . config . query_url . to_string ( ) ,
274+ options. config . subgraphs . escrow . config . query_url . as_ref ( ) ,
281275 options
282276 . config
283277 . subgraphs
@@ -314,12 +308,12 @@ impl IndexerService {
314308 . max_connections ( 50 )
315309 . acquire_timeout ( Duration :: from_secs ( 30 ) )
316310 . connect (
317- & options
311+ options
318312 . config
319313 . database
320314 . clone ( )
321315 . get_formated_postgres_url ( )
322- . to_string ( ) ,
316+ . as_ref ( ) ,
323317 )
324318 . await ?;
325319
Original file line number Diff line number Diff line change @@ -140,8 +140,6 @@ pub async fn run() -> anyhow::Result<()> {
140140 anyhow ! ( e)
141141 } ) ?;
142142
143- let config: Config = config. into ( ) ;
144-
145143 // Parse basic configurations
146144 build_info:: build_info!( fn build_info) ;
147145 let release = IndexerServiceRelease :: from ( build_info ( ) ) ;
@@ -151,14 +149,8 @@ pub async fn run() -> anyhow::Result<()> {
151149 // that is involved in serving requests
152150 let state = Arc :: new ( SubgraphServiceState {
153151 config : config. clone ( ) ,
154- database : database:: connect (
155- & config
156- . database
157- . clone ( )
158- . get_formated_postgres_url ( )
159- . to_string ( ) ,
160- )
161- . await ,
152+ database : database:: connect ( config. database . clone ( ) . get_formated_postgres_url ( ) . as_ref ( ) )
153+ . await ,
162154 cost_schema : routes:: cost:: build_schema ( ) . await ,
163155 graph_node_client : reqwest:: ClientBuilder :: new ( )
164156 . tcp_nodelay ( true )
You can’t perform that action at this time.
0 commit comments