This commit is contained in:
Laszlo Fogas 2019-05-30 12:15:29 +02:00
parent f1fb29e223
commit f65c4993c1
2 changed files with 3 additions and 3 deletions

View file

@ -587,6 +587,8 @@ func server(c *cli.Context) error {
return nil
})
setupMetrics(&g, store_)
// start the server with tls enabled
if c.String("server-cert") != "" {
g.Go(func() error {
@ -608,8 +610,6 @@ func server(c *cli.Context) error {
return g.Wait()
}
setupMetrics(g, store_)
// start the server without tls enabled
if !c.Bool("lets-encrypt") {
return http.ListenAndServe(

View file

@ -205,7 +205,7 @@ func setupTree(c *cli.Context) *httptreemux.ContextMux {
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{
Namespace: "drone",
Name: "pending_jobs",