remove logging when trying forceGC but no global.gc available

remove debug logging of etag cache
This commit is contained in:
HF 2022-04-04 22:30:06 +02:00
parent c38637e788
commit f6901823e6
2 changed files with 0 additions and 12 deletions

View File

@ -1,19 +1,9 @@
/**
*/
import logger from './logger';
/** /**
* https://blog.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/ * https://blog.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/
*/ */
function forceGC() { function forceGC() {
if (global.gc) { if (global.gc) {
global.gc(); global.gc();
} else {
logger.warn('Garbage collection unavailable. '
+ 'Pass --expose-gc when launching node to enable forced garbage '
+ 'collection.');
} }
} }

View File

@ -19,7 +19,6 @@ const chunkEtags = new Map();
RedisCanvas.setChunkChangeCallback((canvasId, cell) => { RedisCanvas.setChunkChangeCallback((canvasId, cell) => {
const [x, y] = cell; const [x, y] = cell;
const ret = chunkEtags.delete(`${canvasId}:${x}:${y}`); const ret = chunkEtags.delete(`${canvasId}:${x}:${y}`);
logger.info(`etag delete ${ret}`);
}); });
/* /*
@ -47,7 +46,6 @@ export default async (req: Request, res: Response, next) => {
const preEtag = req.headers['if-none-match']; const preEtag = req.headers['if-none-match'];
if (curEtag && preEtag === curEtag) { if (curEtag && preEtag === curEtag) {
logger.info(`etag ${curEtag} still the same`);
res.status(304).end(); res.status(304).end();
return; return;
} }