File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
use super :: Blob ;
2
2
use failure:: Error ;
3
3
use futures_util:: {
4
- future:: { FutureExt , TryFutureExt } ,
4
+ future:: FutureExt ,
5
5
stream:: { FuturesUnordered , StreamExt } ,
6
6
} ;
7
7
use log:: { error, warn} ;
@@ -94,15 +94,16 @@ impl<'a> S3Backend<'a> {
94
94
// emit an error and replace the error values with the blob that failed
95
95
// to upload so that we can retry failed uploads
96
96
. map ( |resp| match resp {
97
- Ok ( ..) => Ok ( ( ) ) ,
97
+ Ok ( ..) => {
98
+ // Increment the total uploaded files when a file is uploaded
99
+ crate :: web:: metrics:: UPLOADED_FILES_TOTAL . inc_by ( 1 ) ;
100
+
101
+ Ok ( ( ) )
102
+ }
98
103
Err ( err) => {
99
104
error ! ( "failed to upload file to s3: {:?}" , err) ;
100
105
Err ( blob)
101
106
}
102
- } )
103
- . inspect_ok ( |_| {
104
- // Increment the total uploaded files when a file is uploaded
105
- crate :: web:: metrics:: UPLOADED_FILES_TOTAL . inc_by ( 1 ) ;
106
107
} ) ,
107
108
) ;
108
109
}
You can’t perform that action at this time.
0 commit comments