This reverts commit c329439aac.
This commit is contained in:
Ralf Haferkamp
2026-04-28 16:18:45 +02:00
committed by Ralf Haferkamp
parent 45ed7f0cee
commit c7eeb899d6
2 changed files with 0 additions and 14 deletions
-7
View File
@@ -3,7 +3,6 @@ package main
import ( import (
"fmt" "fmt"
"os" "os"
"time"
"github.com/opencloud-eu/opencloud/opencloud/pkg/command" "github.com/opencloud-eu/opencloud/opencloud/pkg/command"
) )
@@ -13,10 +12,4 @@ func main() {
fmt.Fprintln(os.Stderr, err.Error()) fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1) os.Exit(1)
} }
// INFO: this is a hotfix, we need to replace suture and wait for nats to
// gracefully shutdown using rungroups
// see https://github.com/opencloud-eu/opencloud/issues/2282
fmt.Println("Waiting for 30 seconds before exiting...")
time.Sleep(30 * time.Second)
fmt.Println("Exiting...")
} }
-7
View File
@@ -5,7 +5,6 @@ import (
"crypto/tls" "crypto/tls"
"fmt" "fmt"
"os/signal" "os/signal"
"time"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
pkgcrypto "github.com/opencloud-eu/opencloud/pkg/crypto" pkgcrypto "github.com/opencloud-eu/opencloud/pkg/crypto"
@@ -92,13 +91,7 @@ func Server(cfg *config.Config) *cobra.Command {
gr.Add(runner.New(cfg.Service.Name+".svc", func() error { gr.Add(runner.New(cfg.Service.Name+".svc", func() error {
return natsServer.ListenAndServe() return natsServer.ListenAndServe()
}, func() { }, func() {
// INFO: this is a hotfix, we need to replace suture and wait for nats to
// gracefully shutdown using rungroups
// see https://github.com/opencloud-eu/opencloud/issues/2282
logger.Info().Msg("Gracefully shutting down the NATS server...")
natsServer.Shutdown() natsServer.Shutdown()
time.Sleep(5 * time.Second) // wait for the server to shutdown gracefully
logger.Info().Msg("NATS server shutdown")
})) }))
grResults := gr.Run(ctx) grResults := gr.Run(ctx)