Skip to content
Snippets Groups Projects
Commit 57223a0f authored by dsehnal's avatar dsehnal
Browse files

Fix VolumeServer/query CLI

parent 2ad0754b
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,8 @@ Note that since we don't clearly distinguish between a public and private interf ...@@ -6,6 +6,8 @@ Note that since we don't clearly distinguish between a public and private interf
## [Unreleased] ## [Unreleased]
- Fix VolumeServer/query CLI
## [v3.0.0] - 2022-01-23 ## [v3.0.0] - 2022-01-23
- Assembly handling tweaks: - Assembly handling tweaks:
......
...@@ -197,13 +197,13 @@ export function configureLocal() { ...@@ -197,13 +197,13 @@ export function configureLocal() {
description: VOLUME_SERVER_HEADER description: VOLUME_SERVER_HEADER
}); });
parser.add_argument('--jobs', { help: `Path to a JSON file with job specification.`, required: false }); parser.add_argument('--jobs', { help: `Path to a JSON file with job specification.`, required: false });
parser.add_argument('--jobsTemplate', { help: 'Print example template for jobs.json and exit.', required: false, nargs: 0 }); parser.add_argument('--jobsTemplate', { help: 'Print example template for jobs.json and exit.', required: false, action: 'store_true' });
addJsonConfigArgs(parser); addJsonConfigArgs(parser);
addLimitsArgs(parser); addLimitsArgs(parser);
const config = parser.parse_args() as LimitsConfig & ServerJsonConfig; const config = parser.parse_args() as LimitsConfig & ServerJsonConfig;
if (config.cfgTemplate !== null) { if (config.cfgTemplate) {
console.log(JSON.stringify(DefaultLimitsConfig, null, 2)); console.log(JSON.stringify(DefaultLimitsConfig, null, 2));
process.exit(0); process.exit(0);
} }
...@@ -216,7 +216,7 @@ export function configureLocal() { ...@@ -216,7 +216,7 @@ export function configureLocal() {
setLimitsConfig(cfg); setLimitsConfig(cfg);
} }
if (config.printCfg !== null) { if (config.printCfg) {
console.log(JSON.stringify(LimitsConfig, null, 2)); console.log(JSON.stringify(LimitsConfig, null, 2));
process.exit(0); process.exit(0);
} }
......
...@@ -14,7 +14,7 @@ import * as LocalApi from './server/local-api'; ...@@ -14,7 +14,7 @@ import * as LocalApi from './server/local-api';
const config = configureLocal(); const config = configureLocal();
if (config.jobsTemplate !== null) { if (config.jobsTemplate) {
const exampleJobs: LocalApi.JobEntry[] = [{ const exampleJobs: LocalApi.JobEntry[] = [{
source: { source: {
filename: `g:/test/mdb/xray-1tqn.mdb`, filename: `g:/test/mdb/xray-1tqn.mdb`,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment