Minor tweaks and test
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
e9bd6b867d
commit
71c8937f93
3 changed files with 4 additions and 3 deletions
|
@ -43,6 +43,7 @@ export default class Server {
|
||||||
})
|
})
|
||||||
|
|
||||||
let healthChecks = 0
|
let healthChecks = 0
|
||||||
|
let healthCollectLimit = 10
|
||||||
|
|
||||||
this.flaska.after(function(ctx) {
|
this.flaska.after(function(ctx) {
|
||||||
let ended = performance.now() - ctx.__started
|
let ended = performance.now() - ctx.__started
|
||||||
|
@ -59,7 +60,7 @@ export default class Server {
|
||||||
|
|
||||||
if (ctx.url === '/health') {
|
if (ctx.url === '/health') {
|
||||||
healthChecks++
|
healthChecks++
|
||||||
if (healthChecks > 60 * 60 * 12) {
|
if (healthChecks > healthCollectLimit) {
|
||||||
ctx.log[level]({
|
ctx.log[level]({
|
||||||
duration: Math.round(ended),
|
duration: Math.round(ended),
|
||||||
status: ctx.status,
|
status: ctx.status,
|
||||||
|
|
|
@ -66,7 +66,7 @@ on_success:
|
||||||
https://git.nfp.is/api/v1/repos/$APPVEYOR_REPO_NAME/releases/$RELEASE_ID/assets
|
https://git.nfp.is/api/v1/repos/$APPVEYOR_REPO_NAME/releases/$RELEASE_ID/assets
|
||||||
|
|
||||||
echo "Deplying to production"
|
echo "Deplying to production"
|
||||||
curl -X POST http://192.168.93.50:4010/update/serviceupload
|
curl -X POST http://192.168.93.50:4010/update/storageupload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# on build failure
|
# on build failure
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "storage-upload",
|
"name": "storage-upload",
|
||||||
"version": "2.2.2",
|
"version": "2.2.3",
|
||||||
"description": "Micro service for uploading and image resizing files to a storage server.",
|
"description": "Micro service for uploading and image resizing files to a storage server.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue