mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-04 19:19:03 -06:00
do not force exit to let all services shutdown gracefully
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -140,7 +139,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -60,7 +60,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -55,7 +54,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Err(err).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
{
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -74,7 +74,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -113,7 +112,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -64,7 +63,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -90,7 +90,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Err(err).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -84,7 +83,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
|
||||
@@ -109,7 +108,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
|
||||
natsServer.Shutdown()
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
return gr.Run()
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/micro/ocdav"
|
||||
"github.com/cs3org/reva/v2/pkg/sharedconf"
|
||||
@@ -104,7 +103,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -62,7 +62,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -77,7 +76,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Str("server", "http").
|
||||
Msg("Shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
@@ -216,7 +215,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -74,7 +73,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Str("server", "http").
|
||||
Msg("shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
// prepare a gRPC server and add it to the group run.
|
||||
@@ -93,7 +91,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Str("server", "grpc").
|
||||
Msg("shutting down server")
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
// prepare a debug server and add it to the group run.
|
||||
|
||||
@@ -77,7 +77,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -61,7 +61,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -63,7 +63,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
|
||||
@@ -68,7 +67,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -69,7 +68,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
server, err := debug.Server(
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||
@@ -141,7 +140,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
|
||||
@@ -89,7 +89,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -79,7 +78,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
@@ -92,7 +91,6 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
os.Exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user