diff options
| author | cjd24 | 2018-04-26 09:05:32 +0100 |
|---|---|---|
| committer | cjd24 | 2018-04-26 09:05:32 +0100 |
| commit | cb63120ba8563f327e331c9df045c8a9382b00a8 (patch) | |
| tree | b26723dc1adc8bcb50d449aacab229cf76a11c6b /src/files.ts | |
| parent | adding additional options for file mimetype for scalable_image (diff) | |
| download | medicine-cb63120ba8563f327e331c9df045c8a9382b00a8.tar.gz medicine-cb63120ba8563f327e331c9df045c8a9382b00a8.zip | |
seems to be ready for presentation
Diffstat (limited to 'src/files.ts')
| -rw-r--r-- | src/files.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/files.ts b/src/files.ts index c4d86a8..e7e7805 100644 --- a/src/files.ts +++ b/src/files.ts @@ -23,6 +23,10 @@ const cache = require('redis').createClient(); cache.on("error", function(err: any) { logger.error("Redis_Error: " + err); }) +const imgQueueSize = profiler.counter({ + name: "Queued Image Jobs", + agg_type: "sum" +}) const BASE_BASE: string = `/cs/scratch/${require("os").userInfo().username}/` const CONTENT_BASE_DIRECTORY: string = BASE_BASE + 'files'; @@ -405,6 +409,7 @@ export const views: { if (!cacheHit) { try { let retMe: CZITileRequest; + imgQueueSize.inc(); if (file.originalMimetype.includes('tif') || file.originalMimetype.includes('leica')) { retMe = await getSCNTile( path(file.uuid, project.name, 'scalable_image') + '/', @@ -428,6 +433,7 @@ export const views: { } else { throw new RequestError(400, "bad_tile_mimetype"); } + imgQueueSize.dec(); avgReqDuration.update(Date.now() - startTime) cache.set(url, retMe.file_path); cacheHit = retMe.file_path; |
