Fixed concurrency on hash creation.
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
4f1d72147a
commit
e0bf69faef
@ -248,12 +248,12 @@ function processBlock(items) {
|
||||
lastMessage = moment();
|
||||
}
|
||||
});
|
||||
});
|
||||
}, {
|
||||
concurrency: 5
|
||||
}).catch(function(error) {
|
||||
console.log("Error commiting HASH transactions");
|
||||
throw error;
|
||||
});
|
||||
}).then(function() {
|
||||
let toProcess = needsProcessing.length, lastMessage = moment();
|
||||
console.log(needsProcessing.length + " assets need to have metadata extracted");
|
||||
@ -682,7 +682,7 @@ module.exports = {
|
||||
((Date.now() - now) / 1000) + "s");
|
||||
now = Date.now();
|
||||
|
||||
console.log(albums.length + " assets remaining to have DB entries updated. ETA N/A");
|
||||
console.log(assets.length + " assets remaining to have DB entries updated. ETA N/A");
|
||||
|
||||
let processed = 0, start = Date.now(), last = 0, updateScanned = [];
|
||||
return photoDB.sequelize.transaction(function(transaction) {
|
||||
@ -693,9 +693,6 @@ module.exports = {
|
||||
} else {
|
||||
updateScanned.push(asset.id);
|
||||
}
|
||||
});
|
||||
}, {
|
||||
concurrency: 10
|
||||
}).then(function(asset) {
|
||||
processed++;
|
||||
|
||||
@ -710,6 +707,9 @@ module.exports = {
|
||||
last = processed;
|
||||
start = Date.now();
|
||||
});
|
||||
}, {
|
||||
concurrency: 10
|
||||
});
|
||||
}).then(function() {
|
||||
if (updateScanned.length) {
|
||||
return photoDB.sequelize.query("UPDATE photos SET scanned=CURRENT_TIMESTAMP WHERE id IN (:ids)", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user