@@ -120,7 +120,7 @@ struct CopyState {
120120
121121impl CopyState {
122122 async fn new (
123- conn : & mut PgConnection ,
123+ conn : & mut AsyncPgConnection ,
124124 primary : Primary ,
125125 src : Arc < Layout > ,
126126 dst : Arc < Layout > ,
@@ -170,7 +170,7 @@ impl CopyState {
170170 }
171171
172172 async fn load (
173- conn : & mut PgConnection ,
173+ conn : & mut AsyncPgConnection ,
174174 primary : Primary ,
175175 src : Arc < Layout > ,
176176 dst : Arc < Layout > ,
@@ -190,7 +190,7 @@ impl CopyState {
190190 }
191191
192192 async fn create (
193- conn : & mut PgConnection ,
193+ conn : & mut AsyncPgConnection ,
194194 primary : Primary ,
195195 src : Arc < Layout > ,
196196 dst : Arc < Layout > ,
@@ -255,7 +255,7 @@ impl CopyState {
255255 self . dst . site . shard != self . src . site . shard
256256 }
257257
258- async fn finished ( & self , conn : & mut PgConnection ) -> Result < ( ) , StoreError > {
258+ async fn finished ( & self , conn : & mut AsyncPgConnection ) -> Result < ( ) , StoreError > {
259259 use copy_state as cs;
260260
261261 update ( cs:: table. filter ( cs:: dst. eq ( self . dst . site . id ) ) )
@@ -331,7 +331,7 @@ struct TableState {
331331
332332impl TableState {
333333 async fn init (
334- conn : & mut PgConnection ,
334+ conn : & mut AsyncPgConnection ,
335335 primary : Primary ,
336336 dst_site : Arc < Site > ,
337337 src_layout : & Layout ,
@@ -357,7 +357,7 @@ impl TableState {
357357 }
358358
359359 async fn load (
360- conn : & mut PgConnection ,
360+ conn : & mut AsyncPgConnection ,
361361 primary : Primary ,
362362 src_layout : & Layout ,
363363 dst_layout : & Layout ,
@@ -435,7 +435,7 @@ impl TableState {
435435
436436 async fn record_progress (
437437 & mut self ,
438- conn : & mut PgConnection ,
438+ conn : & mut AsyncPgConnection ,
439439 elapsed : Duration ,
440440 ) -> Result < ( ) , StoreError > {
441441 use copy_table_state as cts;
@@ -472,7 +472,7 @@ impl TableState {
472472 Ok ( ( ) )
473473 }
474474
475- async fn record_finished ( & self , conn : & mut PgConnection ) -> Result < ( ) , StoreError > {
475+ async fn record_finished ( & self , conn : & mut AsyncPgConnection ) -> Result < ( ) , StoreError > {
476476 use copy_table_state as cts;
477477
478478 update (
@@ -486,7 +486,7 @@ impl TableState {
486486 Ok ( ( ) )
487487 }
488488
489- async fn is_cancelled ( & self , conn : & mut PgConnection ) -> Result < bool , StoreError > {
489+ async fn is_cancelled ( & self , conn : & mut AsyncPgConnection ) -> Result < bool , StoreError > {
490490 let dst = self . dst_site . as_ref ( ) ;
491491 let canceled = self . primary . is_copy_cancelled ( dst) . await ?;
492492 if canceled {
@@ -500,7 +500,7 @@ impl TableState {
500500 Ok ( canceled)
501501 }
502502
503- async fn copy_batch ( & mut self , conn : & mut PgConnection ) -> Result < Status , StoreError > {
503+ async fn copy_batch ( & mut self , conn : & mut AsyncPgConnection ) -> Result < Status , StoreError > {
504504 let ( duration, count) = self
505505 . batcher
506506 . step ( async |start, end| {
@@ -529,7 +529,7 @@ impl TableState {
529529
530530 async fn set_batch_size (
531531 & mut self ,
532- conn : & mut PgConnection ,
532+ conn : & mut AsyncPgConnection ,
533533 size : usize ,
534534 ) -> Result < ( ) , StoreError > {
535535 use copy_table_state as cts;
0 commit comments