mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-05 10:20:36 +02:00
Was throwing: currval of sequence builds_build_id_seq is not yet defined in this session
This commit is contained in:
parent
f65c4993c1
commit
16d68eddbf
@ -243,10 +243,6 @@ func setupMetrics(g *errgroup.Group, store_ store.Store) {
|
|||||||
pendingJobs.Set(float64(stats.Stats.Pending))
|
pendingJobs.Set(float64(stats.Stats.Pending))
|
||||||
runningJobs.Set(float64(stats.Stats.Running))
|
runningJobs.Set(float64(stats.Stats.Running))
|
||||||
workers.Set(float64(stats.Stats.Workers))
|
workers.Set(float64(stats.Stats.Workers))
|
||||||
|
|
||||||
buildCount, _ := store_.GetBuildCount()
|
|
||||||
builds.Set(float64(buildCount))
|
|
||||||
|
|
||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -254,6 +250,8 @@ func setupMetrics(g *errgroup.Group, store_ store.Store) {
|
|||||||
for {
|
for {
|
||||||
repoCount, _ := store_.GetRepoCount()
|
repoCount, _ := store_.GetRepoCount()
|
||||||
userCount, _ := store_.GetUserCount()
|
userCount, _ := store_.GetUserCount()
|
||||||
|
buildCount, _ := store_.GetBuildCount()
|
||||||
|
builds.Set(float64(buildCount))
|
||||||
users.Set(float64(userCount))
|
users.Set(float64(userCount))
|
||||||
repos.Set(float64(repoCount))
|
repos.Set(float64(repoCount))
|
||||||
time.Sleep(10 * time.Second)
|
time.Sleep(10 * time.Second)
|
||||||
|
@ -11,4 +11,5 @@ WHERE repo_active = true
|
|||||||
|
|
||||||
-- name: count-builds
|
-- name: count-builds
|
||||||
|
|
||||||
SELECT currval('builds_build_id_seq');
|
SELECT count(1)
|
||||||
|
FROM builds
|
||||||
|
Loading…
Reference in New Issue
Block a user