Avoid doubled reprocessing for scenarios without caching

This commit is contained in:
Michael Krasnyk
2016-09-30 00:11:04 +02:00
committed by Patrick Niklaus
parent 9a85a50586
commit da15c014f5
3 changed files with 26 additions and 11 deletions
+8 -3
View File
@@ -204,18 +204,23 @@ module.exports = function () {
queue.awaitAll(callback);
};
this.reprocess = (callback) => {
this.writeAndLinkOSM = (callback) => {
let queue = d3.queue(1);
queue.defer(this.writeOSM.bind(this));
queue.defer(this.linkOSM.bind(this));
queue.awaitAll(callback);
};
this.reprocess = (callback) => {
let queue = d3.queue(1);
queue.defer(this.writeAndLinkOSM.bind(this));
queue.defer(this.extractAndContract.bind(this));
queue.awaitAll(callback);
};
this.reprocessAndLoadData = (callback) => {
let queue = d3.queue(1);
queue.defer(this.writeOSM.bind(this));
queue.defer(this.linkOSM.bind(this));
queue.defer(this.writeAndLinkOSM.bind(this));
queue.defer(this.extractAndContract.bind(this));
queue.defer(this.osrmLoader.load.bind(this.osrmLoader), this.processedCacheFile);
queue.awaitAll(callback);