Logging memory usage on media fetch.

This commit is contained in:
DebaucheryLibrarian
2021-12-27 17:29:23 +01:00
parent 0ad64ef5f4
commit 299f257a01
5 changed files with 16 additions and 22 deletions

View File

@@ -581,6 +581,7 @@ async function fetchSource(source, baseMedia) {
const maxAttempts = source.attempts || 3;
logger.silly(`Fetching media from ${source.src}`);
logger.debug(`Memory usage before media fetch: ${process.memoryUsage.rss() / 1000000} MB (${source.src})`);
async function attempt(attempts = 1) {
const hasher = new blake2.Hash('blake2b', { digestLength: 24 });