Skip to content

Commit

Permalink
Cleanup nodes dir on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
sazid committed Sep 17, 2021
1 parent 7154b19 commit f11b614
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/nmg/nmg.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func main() {
panic("cannot get current working directory")
}

// Clean up "nodes" directory on startup.
// TODO: Kill running nodes by walking through the nodes and reading their "pid.txt".
os.RemoveAll(nodesDirPath)

config := loadConfig(configFile)
nodesDir := loadDirFS(nodesDirPath) // should this be read from a config file or env variable?

Expand Down

0 comments on commit f11b614

Please sign in to comment.