Skip to content

Commit

Permalink
Mark the current run as successful
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw committed Jun 5, 2024
1 parent 5a081cd commit 1ea0183
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stats-frontend/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@
)
return durations.reduce((a, b) => (a + b)) / durations.length
})()
if (now - nearestHour(now) < avgRunTime)
if (now - nearestHour(now) < avgRunTime) {
// Include this run in the success rate
successRate30Day = max(1, successRate30Day + 1 / (30 * 24))
return setStatus("waiting", successRate30Day, avgRunTime - (now - nearestHour(now)))

}

// Run might overrun - allow up to 15 mins
if (now - nearestHour(now) < 900)
return setStatus("waiting", successRate30Day, 900 - (now - nearestHour(now)))
Expand Down

0 comments on commit 1ea0183

Please sign in to comment.