File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ pub trait Connection: Send + Sync {
258
258
/// it has been marked as completed else `false` meaning there was no change
259
259
async fn mark_benchmark_request_as_completed (
260
260
& self ,
261
- benchmark_request : & mut BenchmarkRequest ,
261
+ benchmark_request : & BenchmarkRequest ,
262
262
) -> anyhow:: Result < bool > ;
263
263
}
264
264
Original file line number Diff line number Diff line change @@ -1891,7 +1891,7 @@ where
1891
1891
1892
1892
async fn mark_benchmark_request_as_completed (
1893
1893
& self ,
1894
- benchmark_request : & mut BenchmarkRequest ,
1894
+ benchmark_request : & BenchmarkRequest ,
1895
1895
) -> anyhow:: Result < bool > {
1896
1896
anyhow:: ensure!(
1897
1897
benchmark_request. tag( ) . is_some( ) ,
@@ -1914,7 +1914,7 @@ where
1914
1914
status = $1,
1915
1915
completed_at = NOW()
1916
1916
WHERE
1917
- banchmark_request .tag = $2
1917
+ benchmark_request .tag = $2
1918
1918
AND benchmark_request.status != $1
1919
1919
AND NOT EXISTS (
1920
1920
SELECT
@@ -1957,8 +1957,6 @@ where
1957
1957
// presence to determine if the request was marked as completed
1958
1958
if let Some ( row) = row {
1959
1959
let completed_at = row. get :: < _ , DateTime < Utc > > ( 0 ) ;
1960
- // Also mutate our object
1961
- benchmark_request. status = BenchmarkRequestStatus :: Completed { completed_at } ;
1962
1960
Ok ( true )
1963
1961
} else {
1964
1962
Ok ( false )
Original file line number Diff line number Diff line change @@ -1356,7 +1356,7 @@ impl Connection for SqliteConnection {
1356
1356
1357
1357
async fn mark_benchmark_request_as_completed (
1358
1358
& self ,
1359
- _benchmark_request : & mut BenchmarkRequest ,
1359
+ _benchmark_request : & BenchmarkRequest ,
1360
1360
) -> anyhow:: Result < bool > {
1361
1361
no_queue_implementation_abort ! ( )
1362
1362
}
Original file line number Diff line number Diff line change @@ -246,17 +246,14 @@ async fn try_enqueue_next_benchmark_request(
246
246
let queue = build_queue ( conn, index) . await ?;
247
247
248
248
#[ allow( clippy:: never_loop) ]
249
- for mut request in queue {
249
+ for request in queue {
250
250
match request. status ( ) {
251
251
BenchmarkRequestStatus :: ArtifactsReady => {
252
252
enqueue_benchmark_request ( conn, & request) . await ?;
253
253
break ;
254
254
}
255
255
BenchmarkRequestStatus :: InProgress => {
256
- if conn
257
- . mark_benchmark_request_as_completed ( & mut request)
258
- . await ?
259
- {
256
+ if conn. mark_benchmark_request_as_completed ( & request) . await ? {
260
257
index. add_tag ( request. tag ( ) . unwrap ( ) ) ;
261
258
continue ;
262
259
}
You can’t perform that action at this time.
0 commit comments