mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-10 17:39:15 +00:00
put all lines by signle query
This commit is contained in:
parent
24007ff7ff
commit
e938dedc4f
@ -136,20 +136,19 @@ exports.init = function(app, callback) {
|
||||
{lines: lines}
|
||||
);
|
||||
|
||||
// write build logs to db
|
||||
_(lines).each(function(line) {
|
||||
db.logLines.put(_({
|
||||
buildId: build.id,
|
||||
}).extend(line), function(err) {
|
||||
if (err) {
|
||||
logger.error(
|
||||
'Error during write log line "' + logLineNumber +
|
||||
'" for build "' + build.id + '":',
|
||||
err.stack || err
|
||||
);
|
||||
}
|
||||
});
|
||||
})
|
||||
line.buildId = build.id;
|
||||
});
|
||||
// write build logs to db
|
||||
db.logLines.put(lines, function(err) {
|
||||
if (err) {
|
||||
logger.error(
|
||||
'Error during write log line "' + logLineNumber +
|
||||
'" for build "' + build.id + '":',
|
||||
err.stack || err
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
callback(null, distributor);
|
||||
|
Loading…
Reference in New Issue
Block a user