Commit 7303e9c2 authored by Geoff Simmons's avatar Geoff Simmons

The busy field in vcl.list may be "-" (if the child is not running).

parent 3a7d46d8
......@@ -495,7 +495,7 @@ var (
"cooling": Cooling,
}
vclMain = regexp.MustCompile(
`^(\w+)\s+(\w+)(?:/|\s+)(\w+)\s+(\d+)\s+(\S+)`)
`^(\w+)\s+(\w+)(?:/|\s+)(\w+)\s+(?:\d+|-)\s+(\S+)`)
vclLbls = regexp.MustCompile(`->\s+(\S+)\s+\((\d+)`)
vclLblRefs = regexp.MustCompile(`(\d+)\s+labels?\)\s*$`)
)
......@@ -542,7 +542,9 @@ func (adm *Admin) VCLList() ([]VCLData, error) {
fmt.Errorf("Unknown temperature %s: %s",
main[3], vcl)
}
if b, e := strconv.ParseUint(main[4], 0, 0); e == nil {
if main[4] == "-" {
datum.Busy = 0
} else if b, e := strconv.ParseUint(main[4], 0, 0); e == nil {
datum.Busy = uint(b)
} else {
return data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment