Add last test launch time in the new /api/runs route

This commit is contained in:
Gaël Métais
2021-03-10 00:54:50 +00:00
parent 36fc0f0e10
commit dc5bd2e71e
2 changed files with 12 additions and 2 deletions
+4 -1
View File
@@ -227,7 +227,10 @@ var ApiController = function(app) {
// Counts all pending runs
app.get('/api/runs', function(req, res) {
res.setHeader('Content-Type', 'application/json');
res.send(JSON.stringify({pendingRuns: queue.length()}, null, 2));
res.send(JSON.stringify({
pendingRuns: queue.length(),
timeSinceLastTestStarted: queue.timeSinceLastTestStarted()
}, null, 2));
});
// Delete one run by id