mirror of
https://github.com/unraid/api.git
synced 2026-05-06 23:20:30 -05:00
chore: misc cleanup
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user