engineVersion, engine keys for /info

pull/82/head
Piero Toffanin 2019-05-20 10:25:02 -04:00
rodzic e3395f908d
commit 676e15b421
3 zmienionych plików z 16 dodań i 10 usunięć

Wyświetl plik

@ -180,12 +180,14 @@ _optional_|Token required for authentication (when authentication is required).|
_optional_|Amount of RAM available in bytes|integer _optional_|Amount of RAM available in bytes|integer
|*cpuCores* + |*cpuCores* +
_optional_|Number of CPU cores (virtual)|integer _optional_|Number of CPU cores (virtual)|integer
|*engine* +
_required_|Lowercase identifier of processing engine|string
|*engineVersion* +
_required_|Current version of processing engine|string
|*maxImages* + |*maxImages* +
_optional_|Maximum number of images allowed for new tasks or null if there's no limit.|integer _required_|Maximum number of images allowed for new tasks or null if there's no limit.|integer
|*maxParallelTasks* + |*maxParallelTasks* +
_optional_|Maximum number of tasks that can be processed simultaneously|integer _optional_|Maximum number of tasks that can be processed simultaneously|integer
|*odmVersion* +
_optional_|Current version of ODM|string
|*taskQueueCount* + |*taskQueueCount* +
_required_|Number of tasks currently being processed or waiting to be processed|integer _required_|Number of tasks currently being processed or waiting to be processed|integer
|*totalMemory* + |*totalMemory* +

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -669,7 +669,7 @@ app.get('/options', authCheck, (req, res) => {
* description: Info * description: Info
* schema: * schema:
* type: object * type: object
* required: [version, taskQueueCount] * required: [version, taskQueueCount, maxImages, engineVersion, engine]
* properties: * properties:
* version: * version:
* type: string * type: string
@ -692,17 +692,20 @@ app.get('/options', authCheck, (req, res) => {
* maxParallelTasks: * maxParallelTasks:
* type: integer * type: integer
* description: Maximum number of tasks that can be processed simultaneously * description: Maximum number of tasks that can be processed simultaneously
* odmVersion: * engineVersion:
* type: string * type: string
* description: Current version of ODM * description: Current version of processing engine
* engine:
* type: string
* description: Lowercase identifier of processing engine
*/ */
app.get('/info', authCheck, (req, res) => { app.get('/info', authCheck, (req, res) => {
async.parallel({ async.parallel({
cpu: cb => si.cpu(data => cb(null, data)), cpu: cb => si.cpu(data => cb(null, data)),
mem: cb => si.mem(data => cb(null, data)), mem: cb => si.mem(data => cb(null, data)),
odmVersion: odmInfo.getVersion engineVersion: odmInfo.getVersion
}, (_, data) => { }, (_, data) => {
const { cpu, mem, odmVersion } = data; const { cpu, mem, engineVersion } = data;
// For testing // For testing
if (req.query._debugUnauthorized){ if (req.query._debugUnauthorized){
@ -719,7 +722,8 @@ app.get('/info', authCheck, (req, res) => {
cpuCores: cpu.cores, cpuCores: cpu.cores,
maxImages: config.maxImages, maxImages: config.maxImages,
maxParallelTasks: config.parallelQueueProcessing, maxParallelTasks: config.parallelQueueProcessing,
odmVersion: odmVersion engineVersion: engineVersion,
engine: 'odm'
}); });
}); });
}); });