From c46e7f4021f2d3e25e6c09904f421cb9b19fbba3 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 1 Oct 2019 12:17:01 +0200 Subject: [PATCH 1/2] log the time it takes to load pins and to run the eviction script --- scripts/evict-inactive.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/evict-inactive.js b/scripts/evict-inactive.js index ebb65d637..366640ce6 100644 --- a/scripts/evict-inactive.js +++ b/scripts/evict-inactive.js @@ -25,6 +25,12 @@ var store; var pins; var Log; var blobs; + +var startTime = +new Date(); +var msSinceStart = function () { + return (+new Date()) - startTime; +}; + nThen(function (w) { // load the store which will be used for iterating over channels // and performing operations like archival and deletion @@ -57,6 +63,8 @@ nThen(function (w) { } blobs = _; })); +}).nThen(function () { + Log.info("EVICT_TIME_TO_LOAD_PINS", msSinceStart()); }).nThen(function (w) { // this block will iterate over archived channels and removes them // if they've been in cold storage for longer than your configured archive time @@ -276,6 +284,8 @@ nThen(function (w) { }; store.listChannels(handler, w(done)); +}).nThen(function (w) { + Log.info("EVICT_TIME_TO_RUN_SCRIPT", msSinceStart()); }).nThen(function () { // the store will keep this script running if you don't shut it down store.shutdown(); From d4e5b98c140c28417e008379ec7af7cdc235792b Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 1 Oct 2019 13:23:38 +0200 Subject: [PATCH 2/2] update nginx config to add trailing slashes to new apps --- docs/example.nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/example.nginx.conf b/docs/example.nginx.conf index 34d114402..a54687560 100644 --- a/docs/example.nginx.conf +++ b/docs/example.nginx.conf @@ -116,7 +116,7 @@ server { try_files $uri =404; } - location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet)$ { + location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams)$ { rewrite ^(.*)$ $1/ redirect; }