File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ pub trait Connection: Send + Sync {
22
22
23
23
async fn load_index ( & mut self ) -> Index ;
24
24
25
+ /// Returns true if the given database backend supports the job queue system.
26
+ fn supports_job_queue ( & self ) -> bool ;
27
+
25
28
/// None means that the caller doesn't know; it should be left alone if
26
29
/// known or set to false if unknown.
27
30
async fn record_compile_benchmark (
Original file line number Diff line number Diff line change @@ -2335,6 +2335,10 @@ where
2335
2335
. await ?;
2336
2336
Ok ( ( ) )
2337
2337
}
2338
+
2339
+ fn supports_job_queue ( & self ) -> bool {
2340
+ true
2341
+ }
2338
2342
}
2339
2343
2340
2344
fn row_to_benchmark_request ( row : & Row , row_offset : Option < usize > ) -> BenchmarkRequest {
Original file line number Diff line number Diff line change @@ -1303,7 +1303,9 @@ impl Connection for SqliteConnection {
1303
1303
}
1304
1304
1305
1305
async fn load_benchmark_request_index ( & self ) -> anyhow:: Result < BenchmarkRequestIndex > {
1306
- no_queue_implementation_abort ! ( )
1306
+ Ok ( BenchmarkRequestIndex {
1307
+ all : Default :: default ( ) ,
1308
+ } )
1307
1309
}
1308
1310
1309
1311
async fn load_pending_benchmark_requests ( & self ) -> anyhow:: Result < PendingBenchmarkRequests > {
@@ -1438,6 +1440,10 @@ impl Connection for SqliteConnection {
1438
1440
) -> anyhow:: Result < Vec < BenchmarkRequestWithErrors > > {
1439
1441
no_queue_implementation_abort ! ( )
1440
1442
}
1443
+
1444
+ fn supports_job_queue ( & self ) -> bool {
1445
+ false
1446
+ }
1441
1447
}
1442
1448
1443
1449
fn parse_artifact_id ( ty : & str , sha : & str , date : Option < i64 > ) -> ArtifactId {
Original file line number Diff line number Diff line change @@ -366,6 +366,9 @@ async fn process_benchmark_requests(
366
366
/// finishes completed benchmark requests.
367
367
async fn perform_queue_tick ( ctxt : & SiteCtxt ) -> anyhow:: Result < ( ) > {
368
368
let mut conn = ctxt. conn ( ) . await ;
369
+ if !conn. supports_job_queue ( ) {
370
+ return Ok ( ( ) ) ;
371
+ }
369
372
370
373
let index = ctxt. known_benchmark_requests . load ( ) ;
371
374
You can’t perform that action at this time.
0 commit comments