File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1112,7 +1112,7 @@ pub struct BenchmarkJob {
1112
1112
benchmark_set : BenchmarkSet ,
1113
1113
created_at : DateTime < Utc > ,
1114
1114
status : BenchmarkJobStatus ,
1115
- retry : u32 ,
1115
+ deque_counter : u32 ,
1116
1116
}
1117
1117
1118
1118
impl BenchmarkJob {
@@ -1147,6 +1147,11 @@ impl BenchmarkJob {
1147
1147
| BenchmarkJobStatus :: Completed { collector_name, .. } => Some ( collector_name) ,
1148
1148
}
1149
1149
}
1150
+
1151
+ /// How many times was the job already dequed?
1152
+ pub fn deque_count ( & self ) -> u32 {
1153
+ self . deque_counter
1154
+ }
1150
1155
}
1151
1156
1152
1157
/// Describes the final state of a job
Original file line number Diff line number Diff line change @@ -1840,6 +1840,7 @@ where
1840
1840
) -> anyhow:: Result < Option < ( BenchmarkJob , ArtifactId ) > > {
1841
1841
// We take the oldest job from the job_queue matching the benchmark_set,
1842
1842
// target and status of 'queued'
1843
+ // If a job was dequeued, we increment its retry (dequeue) count
1843
1844
let row_opt = self
1844
1845
. conn ( )
1845
1846
. query_opt (
@@ -1863,7 +1864,8 @@ where
1863
1864
SET
1864
1865
collector_name = $4,
1865
1866
started_at = NOW(),
1866
- status = $5
1867
+ status = $5,
1868
+ retry = retry + 1
1867
1869
FROM
1868
1870
picked
1869
1871
WHERE
You can’t perform that action at this time.
0 commit comments