File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ pub trait Connection: Send + Sync {
265265
266266 /// Try and mark the benchmark_request as completed. Will return `true` if
267267 /// it has been marked as completed else `false` meaning there was no change
268- async fn mark_benchmark_request_as_completed ( & self , tag : & str ) -> anyhow:: Result < bool > ;
268+ async fn maybe_mark_benchmark_request_as_completed ( & self , tag : & str ) -> anyhow:: Result < bool > ;
269269
270270 /// Mark the job as completed. Sets the status to 'failed' or 'success'
271271 /// depending on the enum's completed state being a success
@@ -450,7 +450,7 @@ mod tests {
450450 . unwrap ( ) ;
451451
452452 assert ! ( db
453- . mark_benchmark_request_as_completed ( request_tag)
453+ . maybe_mark_benchmark_request_as_completed ( request_tag)
454454 . await
455455 . unwrap( ) ) ;
456456 }
@@ -932,7 +932,7 @@ mod tests {
932932 . await
933933 . unwrap ( ) ;
934934 assert ! ( db
935- . mark_benchmark_request_as_completed ( "sha-1" )
935+ . maybe_mark_benchmark_request_as_completed ( "sha-1" )
936936 . await
937937 . unwrap( ) ) ;
938938 Ok ( ctx)
@@ -988,7 +988,9 @@ mod tests {
988988 . await
989989 . unwrap ( ) ;
990990
991- db. mark_benchmark_request_as_completed ( tag) . await . unwrap ( ) ;
991+ db. maybe_mark_benchmark_request_as_completed ( tag)
992+ . await
993+ . unwrap ( ) ;
992994
993995 /* From the status page view we can see that the duration has been
994996 * updated. Albeit that it will be a very short duration. */
Original file line number Diff line number Diff line change @@ -1902,7 +1902,7 @@ where
19021902 }
19031903 }
19041904
1905- async fn mark_benchmark_request_as_completed ( & self , tag : & str ) -> anyhow:: Result < bool > {
1905+ async fn maybe_mark_benchmark_request_as_completed ( & self , tag : & str ) -> anyhow:: Result < bool > {
19061906 // Find if the benchmark is completed and update it's status to completed
19071907 // in one SQL block
19081908 let row = self
Original file line number Diff line number Diff line change @@ -1359,7 +1359,7 @@ impl Connection for SqliteConnection {
13591359 no_queue_implementation_abort ! ( )
13601360 }
13611361
1362- async fn mark_benchmark_request_as_completed ( & self , _tag : & str ) -> anyhow:: Result < bool > {
1362+ async fn maybe_mark_benchmark_request_as_completed ( & self , _tag : & str ) -> anyhow:: Result < bool > {
13631363 no_queue_implementation_abort ! ( )
13641364 }
13651365
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ async fn try_enqueue_next_benchmark_request(
254254 }
255255 BenchmarkRequestStatus :: InProgress => {
256256 if conn
257- . mark_benchmark_request_as_completed ( request. tag ( ) . unwrap ( ) )
257+ . maybe_mark_benchmark_request_as_completed ( request. tag ( ) . unwrap ( ) )
258258 . await ?
259259 {
260260 index. add_tag ( request. tag ( ) . unwrap ( ) ) ;
@@ -366,7 +366,7 @@ mod tests {
366366 . unwrap ( ) ;
367367
368368 assert ! ( db
369- . mark_benchmark_request_as_completed ( request_tag)
369+ . maybe_mark_benchmark_request_as_completed ( request_tag)
370370 . await
371371 . unwrap( ) ) ;
372372 }
You can’t perform that action at this time.
0 commit comments