1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-11-02 08:34:44 +00:00

report running state, only show spinner when actually running

This commit is contained in:
Oliver Giles
2015-12-06 12:15:05 +01:00
parent 87ebf91f1e
commit f181c87d3b
5 changed files with 12 additions and 5 deletions

View File

@@ -156,6 +156,7 @@ void Laminar::sendStatus(LaminarClient* client) {
j.set("queued", run->startedAt - run->queuedAt);
j.set("started", run->startedAt);
j.set("reason", run->reason());
j.set("result", to_string(RunState::RUNNING));
db->stmt("SELECT completedAt - startedAt FROM builds WHERE name = ? ORDER BY completedAt DESC LIMIT 1")
.bind(run->name)
.fetch<int>([&](int etc){
@@ -188,6 +189,7 @@ void Laminar::sendStatus(LaminarClient* client) {
j.set("number", run->build);
j.set("node", run->node->name);
j.set("started", run->startedAt);
j.set("result", to_string(RunState::RUNNING));
j.set("reason", run->reason());
j.EndObject();
}