|
|
|
@ -52,10 +52,12 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
|
|
|
echoServer.Use(middleware.Recover())
|
|
|
|
echoServer.Use(middleware.Recover())
|
|
|
|
s.echoServer = echoServer
|
|
|
|
s.echoServer = echoServer
|
|
|
|
|
|
|
|
|
|
|
|
// Initialize profiler
|
|
|
|
if profile.Mode != "prod" {
|
|
|
|
s.profiler = profiler.NewProfiler()
|
|
|
|
// Initialize profiler
|
|
|
|
s.profiler.RegisterRoutes(echoServer)
|
|
|
|
s.profiler = profiler.NewProfiler()
|
|
|
|
s.profiler.StartMemoryMonitor(ctx)
|
|
|
|
s.profiler.RegisterRoutes(echoServer)
|
|
|
|
|
|
|
|
s.profiler.StartMemoryMonitor(ctx)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
workspaceBasicSetting, err := s.getOrUpsertWorkspaceBasicSetting(ctx)
|
|
|
|
workspaceBasicSetting, err := s.getOrUpsertWorkspaceBasicSetting(ctx)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
|