mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
Fixes
This commit is contained in:
parent
f1fb29e223
commit
f65c4993c1
2 changed files with 3 additions and 3 deletions
|
@ -587,6 +587,8 @@ func server(c *cli.Context) error {
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
setupMetrics(&g, store_)
|
||||||
|
|
||||||
// start the server with tls enabled
|
// start the server with tls enabled
|
||||||
if c.String("server-cert") != "" {
|
if c.String("server-cert") != "" {
|
||||||
g.Go(func() error {
|
g.Go(func() error {
|
||||||
|
@ -608,8 +610,6 @@ func server(c *cli.Context) error {
|
||||||
return g.Wait()
|
return g.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
setupMetrics(g, store_)
|
|
||||||
|
|
||||||
// start the server without tls enabled
|
// start the server without tls enabled
|
||||||
if !c.Bool("lets-encrypt") {
|
if !c.Bool("lets-encrypt") {
|
||||||
return http.ListenAndServe(
|
return http.ListenAndServe(
|
||||||
|
|
|
@ -205,7 +205,7 @@ func setupTree(c *cli.Context) *httptreemux.ContextMux {
|
||||||
|
|
||||||
func before(c *cli.Context) error { return nil }
|
func before(c *cli.Context) error { return nil }
|
||||||
|
|
||||||
func setupMetrics(g errgroup.Group, store_ store.Store) {
|
func setupMetrics(g *errgroup.Group, store_ store.Store) {
|
||||||
pendingJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
pendingJobs := promauto.NewGauge(prometheus.GaugeOpts{
|
||||||
Namespace: "drone",
|
Namespace: "drone",
|
||||||
Name: "pending_jobs",
|
Name: "pending_jobs",
|
||||||
|
|
Loading…
Reference in a new issue