Skip to content
Snippets Groups Projects
Commit c4d8c36f authored by Rhys Arkins's avatar Rhys Arkins
Browse files

logs: log github requests only if non-cached

parent 2985511b
Branches
Tags
No related merge requests found
......@@ -11,11 +11,11 @@ function sleep(ms) {
async function get(path, opts, retries = 5) {
const method = opts && opts.method ? opts.method : 'get';
logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
if (method === 'get' && cache[path]) {
logger.trace({ path }, 'Returning cached result');
return cache[path];
}
logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
try {
if (appMode) {
/* eslint-disable no-param-reassign */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment