getServiceState: configurable threshold

for testing
This commit is contained in:
slice 2018-07-22 12:26:06 -07:00
parent ec52c980fb
commit a1cca92a8c
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ const titles = {
dead: 'This service is unresponsive.',
}
function getServiceState (status, latency) {
if (status && latency > SLOW_THRESHOLD) {
export function getServiceState (status, latency, threshold = SLOW_THRESHOLD) {
if (status && latency > threshold) {
return 'slow'
}