:sparkles: ProgressStats introduced
diff --git a/index.js b/index.js
index 879016d..7564b59 100644
--- a/index.js
+++ b/index.js
@@ -14,6 +14,9 @@
var osmBoundarySources = require('./osmBoundarySources.json')
var zoneCfg = require('./timezones.json')
+const ProgressStats = require('./progressStats')
+var progressStats = new ProgressStats(Object.keys(osmBoundarySources).length)
+
// allow building of only a specified zones
var filteredIndex = process.argv.indexOf('--filtered-zones')
if (filteredIndex > -1 && process.argv[filteredIndex + 1]) {
@@ -161,7 +164,8 @@
asynclib.auto({
downloadFromOverpass: function (cb) {
- console.log('downloading from overpass')
+ progressStats.logNext()
+ console.log('downloading from overpass; overall progress ' + progressStats.getPercentage() + '% done - ' + progressStats.getTimeLeft(5) + ' left')
fetchIfNeeded(boundaryFilename, boundaryCallback, cb, function () {
var overpassResponseHandler = function (err, data) {
if (err) {