MCPcopy Create free account
hub / github.com/rilldata/rill / resetState

Method resetState

cli/cmd/devtool/start.go:400–414  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

398}
399
400func (s cloud) resetState(ctx context.Context) (err error) {
401 logInfo.Printf("Resetting state\n")
402 defer func() {
403 if err == nil {
404 logInfo.Printf("Reset state\n")
405 } else {
406 logErr.Printf("Failed to reset state: %v", err)
407 }
408 }()
409
410 _ = os.RemoveAll(stateDirectory())
411
412 // tear down all containers regardless of profile
413 return newCmd(ctx, "docker", "compose", "--env-file", ".env", "-f", composeFile, "down", "--volumes").Run()
414}
415
416func (s cloud) runDeps(ctx context.Context, verbose bool, preset string) error {
417 composeFile := "cli/cmd/devtool/data/cloud-deps.docker-compose.yml"

Callers 1

startMethod · 0.95

Calls 4

stateDirectoryFunction · 0.85
newCmdFunction · 0.85
PrintfMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected