diff --git a/pkg/runtime/init.go b/pkg/runtime/init.go index 3bc68ed0..2f3661e7 100644 --- a/pkg/runtime/init.go +++ b/pkg/runtime/init.go @@ -39,6 +39,7 @@ func initRuntime(maxProc int) { panic(ErrKclvmRootNotFound) } + fmt.Println("Init kcl runtime ...") rpcRuntime = NewRuntime(int(maxProc), "kclvm_cli", "server") rpcRuntime.Start() diff --git a/pkg/runtime/runtime.go b/pkg/runtime/runtime.go index dc95a28b..1ba2bc2a 100644 --- a/pkg/runtime/runtime.go +++ b/pkg/runtime/runtime.go @@ -47,25 +47,6 @@ func (p *Runtime) Start() { p.mu.Lock() defer p.mu.Unlock() - // Try to get the runtime - // if !env.GetDisableInstallArtifact() { - // // Get the install lib path. - // path := path.LibPath() - // err := os.MkdirAll(path, 0777) - // if err != nil { - // logger.GetLogger().Warningf("install kclvm failed: %s", err.Error()) - // } - // // Acquire a file lock for process synchronization - // lockPath := filepath.Join(path, "init.lock") - // fileLock := flock.New(lockPath) - // lockCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - // defer cancel() - // locked, err := fileLock.TryLockContext(lockCtx, time.Second) - // if err == nil && locked { - // defer fileLock.Unlock() - // } - // } - for i, proc := range p.procs { if proc == nil || proc.IsExited() { proc, err := createProcess(p.exe, p.args...)