Skip to content

Commit ea1a30f

Browse files
authored
Merge pull request #2239 from Kobzol/is_active
Check if collector is active when starting it
2 parents fb22792 + 0425404 commit ea1a30f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

collector/src/bin/collector.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,9 @@ Make sure to modify `{dir}/perf-config.json` if the category/artifact don't matc
13891389
let collector_config = rt
13901390
.block_on(conn.start_collector(&collector_name, &git_sha))?
13911391
.ok_or_else(|| {
1392-
anyhow::anyhow!("Collector with name `{collector_name}` not found")
1392+
anyhow::anyhow!(
1393+
"No active collector with the name `{collector_name}` not found"
1394+
)
13931395
})?;
13941396

13951397
if collector_config.target().as_str() != host_target_tuple {

database/src/pool/postgres.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,8 @@ where
18161816
last_heartbeat_at = NOW(),
18171817
commit_sha = $2
18181818
WHERE
1819-
name = $1
1819+
name = $1 AND
1820+
is_active = true
18201821
RETURNING
18211822
target,
18221823
benchmark_set,

0 commit comments

Comments
 (0)