mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-11 10:29:17 +00:00
more compact log storing
This commit is contained in:
parent
cf4ea019da
commit
c603326088
3
db.js
3
db.js
@ -95,7 +95,8 @@ exports.init = function(dbPath, params, callback) {
|
|||||||
return _(logLine).pick('number', 'text');
|
return _(logLine).pick('number', 'text');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
withUniqueId: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,18 +136,17 @@ exports.init = function(app, callback) {
|
|||||||
buildLogLineNumbersHash[build.id] = 1;
|
buildLogLineNumbersHash[build.id] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var logLineNumber = buildLogLineNumbersHash[build.id],
|
var logLineNumber = buildLogLineNumbersHash[build.id];
|
||||||
logLineId = build.id + '-' + logLineNumber;
|
|
||||||
|
|
||||||
db.logLines.put({
|
db.logLines.put({
|
||||||
id: logLineId,
|
|
||||||
buildId: build.id,
|
buildId: build.id,
|
||||||
number: logLineNumber,
|
number: logLineNumber,
|
||||||
text: data
|
text: data
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error(
|
logger.error(
|
||||||
'Error during write log line "' + logLineId + '":',
|
'Error during write log line "' + logLineNumber +
|
||||||
|
'" for build "' + build.id + '":',
|
||||||
err.stack || err
|
err.stack || err
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"colors": "1.1.2",
|
"colors": "1.1.2",
|
||||||
"cron": "1.0.9",
|
"cron": "1.0.9",
|
||||||
"data.io": "0.3.0",
|
"data.io": "0.3.0",
|
||||||
"nlevel": "1.0.2",
|
"nlevel": "1.0.3",
|
||||||
"node-static": "0.7.6",
|
"node-static": "0.7.6",
|
||||||
"socket.io": "1.3.5",
|
"socket.io": "1.3.5",
|
||||||
"twostep": "0.4.1",
|
"twostep": "0.4.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user