Smalll documentation, TODOs.

This commit is contained in:
Jonathan Bernard
2017-08-01 08:49:42 -05:00
parent 1299311a4c
commit 0a6023c656
6 changed files with 27 additions and 9 deletions

View File

@ -131,6 +131,9 @@ proc start*(cfg: StrawBossConfig): void =
let stopFuture = newFuture[void]()
var workers: seq[Worker] = @[]
# TODO: add recurring clean-up down to clear completed workers from the
# workers queu and kick off pending requests as worker slots free up.
settings:
port = Port(8180)
appName = "/api"
@ -254,15 +257,14 @@ proc start*(cfg: StrawBossConfig): void =
resp($(%runRequests), JSON)
# TODO
resp(Http501, makeJsonResp(Http501), JSON)
get "/project/@projectName/runs/active":
## List all currently active runs
checkAuth(); if not authed: return true
# TODO
#let statusFiles = workers.mapIt(it.workingDir & "/status.json")
#let statuses = statusFiles.mapIt(loadBuildStatus(it)).filterIt(it.state != "completed" && it.)
#resp($(%statuses), JSON)
resp(Http501, makeJsonResp(Http501), JSON)
get "/project/@projectName/runs/@runId":