server: Fix logging for health, aggregate them into 12 * 60 * 60 instances
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

This commit is contained in:
Jonatan Nilsson 2022-08-15 20:22:21 +00:00
parent 5841dbdaab
commit f1be7e0d79
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ export default class Server {
})
let healthChecks = 0
let healthCollectLimit = 10
let healthCollectLimit = 60 * 60 * 12
this.flaska.after(function(ctx) {
let ended = performance.now() - ctx.__started
@ -60,7 +60,7 @@ export default class Server {
if (ctx.url === '/health') {
healthChecks++
if (healthChecks > healthCollectLimit) {
if (healthChecks >= healthCollectLimit) {
ctx.log[level]({
duration: Math.round(ended),
status: ctx.status,

View file

@ -1,6 +1,6 @@
{
"name": "storage-upload",
"version": "2.2.4",
"version": "2.2.5",
"description": "Micro service for uploading and image resizing files to a storage server.",
"main": "index.js",
"scripts": {