Fix bug around spawning worker processes.

We were expecting to find the path to the `strawboss` binary implicitly from
the environment, which meant that configuration was also implicit, and required
more setup. Now the path to the binary is explicit in the StrawBoss runtime
configuration, and the path to the configuration file can also be explicitly given.
This commit is contained in:
Jonathan Bernard
2017-05-11 10:43:55 -05:00
parent 42f37a21e6
commit a1100f17d8
6 changed files with 47 additions and 15 deletions

View File

@ -37,7 +37,9 @@ type
StrawBossConfig* = object
artifactsRepo*: string
authSecret*: string
filePath*: string
debug*: bool
pathToExe*: string
projects*: seq[ProjectDef]
pwdCost*: int8
users*: seq[UserRef]
@ -131,6 +133,7 @@ proc loadStrawBossConfig*(cfgFile: string): StrawBossConfig =
raiseEx "strawboss config file not found: " & cfgFile
result = parseStrawBossConfig(parseFile(cfgFile))
result.filePath = cfgFile
proc loadProjectConfig*(cfgFile: string): ProjectConfig =
if not existsFile(cfgFile):