mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
* [ws-manager, ws-daemon] Store initializer metrics in workspace.Status.InitializerMetrics Tool: gitpod/catfood.gitpod.cloud * [ws-mananger-api, -mk2] Emit new field .Status.InitializerMetrics Tool: gitpod/catfood.gitpod.cloud * [db] Introduce DBWorkspaceInstanceMetrics and persist all metrics from ws-manager-api into it Tool: gitpod/catfood.gitpod.cloud * [api] Expose session.Metrics.InitializerMetrics Tool: gitpod/catfood.gitpod.cloud * [dashboard] Export metrics into CSV Tool: gitpod/catfood.gitpod.cloud * [content-service] Fix: emit fromBackup stats Tool: gitpod/catfood.gitpod.cloud * Update components/ws-manager-api/core.proto Co-authored-by: Filip Troníček <filip@gitpod.io> --------- Co-authored-by: Filip Troníček <filip@gitpod.io>
36 lines
807 B
Go
36 lines
807 B
Go
// Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
// Licensed under the GNU Affero General Public License (AGPL).
|
|
// See License.AGPL.txt in the project root for license information.
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/gitpod-io/gitpod/ws-daemon/pkg/content"
|
|
)
|
|
|
|
// contentInitializerCmd creates a workspace snapshot
|
|
var contentInitializerCmd = &cobra.Command{
|
|
Use: "content-initializer",
|
|
Short: "fork'ed by ws-daemon to initialize content",
|
|
Args: cobra.ExactArgs(0),
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
statsFd := os.NewFile(content.RUN_INITIALIZER_CHILD_STATS_FD, "stats")
|
|
|
|
err := content.RunInitializerChild(statsFd)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
clientCmd.AddCommand(contentInitializerCmd)
|
|
}
|