chore: misc cleanup

This commit is contained in:
Alexis Tyler
2020-12-13 00:36:42 +10:30
parent 923039af66
commit 2bff9f0f09
4 changed files with 5 additions and 7 deletions
+1
View File
@@ -9,4 +9,5 @@ export const log = new Logger();
export const coreLogger = log.createChild({ prefix: '[@unraid/core]: '});
export const mothershipLogger = log.createChild({ prefix: '[@unraid/mothership]: '});
export const graphqlLogger = log.createChild({ prefix: '[@unraid/graphql]: '});
export const relayLogger = log.createChild({ prefix: '[@unraid/relay]: '});
export const discoveryLogger = log.createChild({ prefix: '[@unraid/discovery]: '});
@@ -8,7 +8,7 @@ import { CacheManager } from '../../cache-manager';
import { CoreResult, CoreContext } from '../../types';
import { ensurePermission } from '../../utils';
const cache = new CacheManager('unraid:modules:get-system');
const cache = new CacheManager('unraid:modules:get-system-versions');
/**
* Software versions.
+1 -1
View File
@@ -11,7 +11,7 @@ import { FileMissingError, FatalAppError } from '../../errors';
import { ensurePermission } from '../../utils';
import { CoreResult, CoreContext } from '../../types';
const cache = new CacheManager('unraid:modules:get-unraid');
const cache = new CacheManager('unraid:modules:get-unraid-version');
interface Result extends CoreResult {
json: {
+2 -5
View File
@@ -52,11 +52,8 @@ export const run = async (channel: string, mutation: string, options: RunOptions
return resolve(moduleToRun(context));
});
// Services
if (moduleToRun.name !== 'Gg') {
// Log result
coreLogger.silly(`run:${moduleToRun.name}`, JSON.stringify(result, null, 2));
}
// Log result
coreLogger.silly(`run:${moduleToRun.name}`, JSON.stringify(result.json, null, 2));
// Save result
publish(channel, mutation, result.json);