Skip to content

Commit

Permalink
test:
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Jul 24, 2024
1 parent 40d4c5d commit 866986c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
1 change: 1 addition & 0 deletions pkg/runtime/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func initRuntime(maxProc int) {
panic(ErrKclvmRootNotFound)
}

fmt.Println("Init kcl runtime ...")
rpcRuntime = NewRuntime(int(maxProc), "kclvm_cli", "server")
rpcRuntime.Start()

Expand Down
19 changes: 0 additions & 19 deletions pkg/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit 866986c

Please sign in to comment.