@@ -61,7 +61,7 @@ impl Scope {
6161 }
6262
6363 /// Unlock the deployment in this scope with the given id.
64- fn unlock ( & self , conn : & mut PgConnection , id : DeploymentId ) -> Result < ( ) , StoreError > {
64+ async fn unlock ( & self , conn : & mut PgConnection , id : DeploymentId ) -> Result < ( ) , StoreError > {
6565 sql_query ( format ! ( "select pg_advisory_unlock({}, {id})" , self . id) )
6666 . execute ( conn)
6767 . map ( |_| ( ) )
@@ -107,8 +107,8 @@ pub(crate) async fn lock_copying(conn: &mut PgConnection, dst: &Site) -> Result<
107107}
108108
109109/// Release the lock acquired with `lock_copying`.
110- pub ( crate ) fn unlock_copying ( conn : & mut PgConnection , dst : & Site ) -> Result < ( ) , StoreError > {
111- COPY . unlock ( conn, dst. id )
110+ pub ( crate ) async fn unlock_copying ( conn : & mut PgConnection , dst : & Site ) -> Result < ( ) , StoreError > {
111+ COPY . unlock ( conn, dst. id ) . await
112112}
113113
114114/// Take the lock used to keep two operations from writing to the deployment
@@ -123,11 +123,11 @@ pub(crate) async fn lock_deployment_session(
123123}
124124
125125/// Release the lock acquired with `lock_deployment_session`.
126- pub ( crate ) fn unlock_deployment_session (
126+ pub ( crate ) async fn unlock_deployment_session (
127127 conn : & mut PgConnection ,
128128 site : & Site ,
129129) -> Result < ( ) , StoreError > {
130- WRITE . unlock ( conn, site. id )
130+ WRITE . unlock ( conn, site. id ) . await
131131}
132132
133133/// Try to take the lock used to prevent two prune operations from running at the
@@ -139,6 +139,6 @@ pub(crate) async fn try_lock_pruning(
139139 PRUNE . try_lock ( conn, site. id ) . await
140140}
141141
142- pub ( crate ) fn unlock_pruning ( conn : & mut PgConnection , site : & Site ) -> Result < ( ) , StoreError > {
143- PRUNE . unlock ( conn, site. id )
142+ pub ( crate ) async fn unlock_pruning ( conn : & mut PgConnection , site : & Site ) -> Result < ( ) , StoreError > {
143+ PRUNE . unlock ( conn, site. id ) . await
144144}
0 commit comments