mirror of
https://github.com/elyby/chrly.git
synced 2025-05-31 14:11:51 +05:30
Simple implementation of the health checker for the worker
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/etherlabsio/healthcheck"
|
||||
"github.com/mono83/slf/wd"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@@ -51,6 +52,12 @@ var workerCmd = &cobra.Command{
|
||||
Emitter: dispatcher,
|
||||
UUIDsProvider: uuidsProvider,
|
||||
}).CreateHandler()
|
||||
handler.Handle("/healthcheck", healthcheck.Handler(
|
||||
healthcheck.WithChecker(
|
||||
"mojang-batch-uuids-provider-response",
|
||||
eventsubscribers.MojangBatchUuidsProviderChecker(dispatcher),
|
||||
),
|
||||
)).Methods("GET")
|
||||
|
||||
finishChan := make(chan bool)
|
||||
go func() {
|
||||
|
Reference in New Issue
Block a user