Skip to content

Commit

Permalink
changes runtime config to be a path (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikey authored Nov 29, 2023
1 parent b03e7a9 commit 6913764
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/node/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func parseFlags() *config.Config {
pflag.UintVarP(&cfg.Concurrency, "concurrency", "c", defaultConcurrency, "maximum number of requests node will process in parallel")
pflag.StringVar(&cfg.API, "rest-api", "", "address where the head node REST API will listen on")
pflag.StringVar(&cfg.Workspace, "workspace", "./workspace", "directory that the node can use for file storage")
pflag.StringVar(&cfg.Runtime, "runtime", "", "runtime address (used by the worker node)")
pflag.StringVar(&cfg.RuntimePath, "runtime-path", "", "runtime path (used by the worker node)")
pflag.BoolVar(&cfg.LoadAttributes, "attributes", false, "node should try to load its attribute data from IPFS")

// Host configuration.
Expand Down
4 changes: 2 additions & 2 deletions cmd/node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func run() int {
// Executor options.
execOptions := []executor.Option{
executor.WithWorkDir(cfg.Workspace),
executor.WithRuntimeDir(cfg.Runtime),
executor.WithRuntimeDir(cfg.RuntimePath),
}

if needLimiter(cfg) {
Expand All @@ -158,7 +158,7 @@ func run() int {
log.Error().
Err(err).
Str("workspace", cfg.Workspace).
Str("runtime", cfg.Runtime).
Str("runtime_path", cfg.RuntimePath).
Msg("could not create an executor")
return failure
}
Expand Down
2 changes: 1 addition & 1 deletion config/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Config struct {

Host Host
API string
Runtime string
RuntimePath string
LoadAttributes bool

CPUPercentage float64
Expand Down

0 comments on commit 6913764

Please sign in to comment.