Restore --max-wait and file_lock for osrm-datastore

This commit is contained in:
Patrick Niklaus
2017-01-05 22:38:48 +00:00
committed by Patrick Niklaus
parent a7bb26f2d6
commit 104e23abf3
12 changed files with 234 additions and 120 deletions
+1 -5
View File
@@ -99,7 +99,6 @@ class OSRMDatastoreLoader extends OSRMBaseLoader {
if (err) return callback(err);
if (!this.osrmIsRunning()) this.launch(callback);
else {
// some osrm-routed output prior this line can appear in the prevoius log file
this.scope.setupOutputLog(this.child, fs.createWriteStream(this.scope.scenarioLogFile, {'flags': 'a'}));
callback();
}
@@ -109,10 +108,7 @@ class OSRMDatastoreLoader extends OSRMBaseLoader {
loadData (callback) {
this.scope.runBin('osrm-datastore', this.inputFile, this.scope.environment, (err) => {
if (err) return callback(new Error('*** osrm-datastore exited with ' + err.code + ': ' + err));
// in case of false positive results with a dummy 1ms delay an stdout monitor
// this.child.stdout.on('data', facade_monitor) must be added and wait for
// "updated facade to region" in stdout
setTimeout(callback, 1);
callback();
});
}