File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 11use super :: Blob ;
22use failure:: Error ;
33use futures_util:: {
4- future:: { FutureExt , TryFutureExt } ,
4+ future:: FutureExt ,
55 stream:: { FuturesUnordered , StreamExt } ,
66} ;
77use log:: { error, warn} ;
@@ -94,15 +94,16 @@ impl<'a> S3Backend<'a> {
9494 // emit an error and replace the error values with the blob that failed
9595 // to upload so that we can retry failed uploads
9696 . 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+ }
98103 Err ( err) => {
99104 error ! ( "failed to upload file to s3: {:?}" , err) ;
100105 Err ( blob)
101106 }
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 ) ;
106107 } ) ,
107108 ) ;
108109 }
You can’t perform that action at this time.
0 commit comments