From 2a48927a08a52b359be5bfd5cc22dd4cbd9a6444 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 1 Aug 2025 12:54:28 +0300 Subject: [PATCH] update hooks --- hooks/run.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hooks/run.go b/hooks/run.go index 995806c..d99fa69 100644 --- a/hooks/run.go +++ b/hooks/run.go @@ -28,16 +28,16 @@ import ( "golang.org/x/net/netutil" ) -var nodeApp = app.New() +var NodeApp = app.New() func Run(cmd *cobra.Command, args []string) { - nodeApp.InitialHooks( + NodeApp.InitialHooks( Init0Hook, Init1Hook, Init2Hook, Init3Hook, Init4Hook, Init5Hook, - Init6Hook, Init7Hook, + Init6Hook, Init7Hook, Init8Hook, ) - nodeApp.Run(RunHook) + NodeApp.Run(RunHook) } func RunHook(ctx context.Context, cs *corestate.CoreState, x *app.AppX) error { @@ -96,7 +96,7 @@ func RunHook(ctx context.Context, cs *corestate.CoreState, x *app.AppX) error { }, "", 0), } - nodeApp.Fallback(func(ctx context.Context, cs *corestate.CoreState, x *app.AppX) { + NodeApp.Fallback(func(ctx context.Context, cs *corestate.CoreState, x *app.AppX) { if err := srv.Shutdown(ctxMain); err != nil { x.Log.Printf("%s: Failed to stop the server gracefully: %s", colors.PrintError(), err.Error()) } else { @@ -171,6 +171,6 @@ func RunHook(ctx context.Context, cs *corestate.CoreState, x *app.AppX) error { } <-ctxMain.Done() - nodeApp.CallFallback(ctx) + NodeApp.CallFallback(ctx) return nil }