11//! Utilities for dealing with deployment metadata. Any connection passed
22//! into these methods must be for the shard that holds the actual
33//! deployment data and metadata
4- use crate :: {
5- advisory_lock, detail:: GraphNodeVersion , pool:: PgConnection , primary:: DeploymentId ,
6- AsyncPgConnection ,
7- } ;
4+ use crate :: { advisory_lock, detail:: GraphNodeVersion , primary:: DeploymentId , AsyncPgConnection } ;
85use diesel:: {
96 dsl:: { count, delete, insert_into, now, select, sql, update} ,
107 sql_types:: { Bool , Integer } ,
@@ -989,7 +986,7 @@ pub(crate) async fn insert_subgraph_errors(
989986
990987#[ cfg( debug_assertions) ]
991988pub ( crate ) async fn error_count (
992- conn : & mut PgConnection ,
989+ conn : & mut AsyncPgConnection ,
993990 id : & DeploymentHash ,
994991) -> Result < usize , StoreError > {
995992 use subgraph_error as e;
@@ -1116,7 +1113,7 @@ pub(crate) async fn revert_subgraph_errors(
11161113}
11171114
11181115pub ( crate ) async fn delete_error (
1119- conn : & mut PgConnection ,
1116+ conn : & mut AsyncPgConnection ,
11201117 error_id : & str ,
11211118) -> Result < ( ) , StoreError > {
11221119 use subgraph_error as e;
@@ -1130,7 +1127,7 @@ pub(crate) async fn delete_error(
11301127/// Copy the dynamic data sources for `src` to `dst`. All data sources that
11311128/// were created up to and including `target_block` will be copied.
11321129pub ( crate ) async fn copy_errors (
1133- conn : & mut PgConnection ,
1130+ conn : & mut AsyncPgConnection ,
11341131 src : & Site ,
11351132 dst : & Site ,
11361133 target_block : & BlockPtr ,
@@ -1390,7 +1387,7 @@ pub async fn set_earliest_block(
13901387/// go across shards and use the metadata tables mapped into the shard for
13911388/// `conn` which must be the shard for `dst`
13921389pub async fn copy_earliest_block (
1393- conn : & mut PgConnection ,
1390+ conn : & mut AsyncPgConnection ,
13941391 src : & Site ,
13951392 dst : & Site ,
13961393) -> Result < ( ) , StoreError > {
0 commit comments