Skip to content

Commit 8b9d39c

Browse files
committed
update query & fix linter
1 parent 9863980 commit 8b9d39c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

database/src/pool/postgres.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,17 +1932,13 @@ where
19321932
1
19331933
FROM
19341934
job_queue
1935-
JOIN
1936-
benchmark_request AS parent_request
1937-
ON
1938-
parent_request.tag = benchmark_request.parent_tag
19391935
WHERE
1940-
job_queue.request_tag = parent_request.tag
1936+
request_tag = benchmark_request.parent_sha
19411937
AND job_queue.status NOT IN ($3, $4)
19421938
)
19431939
)
19441940
RETURNING
1945-
benchmark_request.completed_at;
1941+
benchmark_request.tag;
19461942
",
19471943
&[
19481944
&BENCHMARK_REQUEST_STATUS_COMPLETED_STR,
@@ -1955,8 +1951,7 @@ where
19551951
.context("Failed to mark benchmark_request as completed")?;
19561952
// The affected id is returned by the query thus we can use the row's
19571953
// presence to determine if the request was marked as completed
1958-
if let Some(row) = row {
1959-
let completed_at = row.get::<_, DateTime<Utc>>(0);
1954+
if row.is_some() {
19601955
Ok(true)
19611956
} else {
19621957
Ok(false)

0 commit comments

Comments
 (0)