forked from MapComplete/MapComplete
Add test for generating the cache
This commit is contained in:
parent
4ad4db3bbd
commit
312dbe7aff
7 changed files with 70 additions and 13 deletions
|
@ -4,6 +4,8 @@ import {Utils} from "../../Utils";
|
|||
import {exec} from "child_process"
|
||||
import {GeoOperations} from "../../Logic/GeoOperations";
|
||||
|
||||
ScriptUtils.fixUtils()
|
||||
|
||||
class StatsDownloader {
|
||||
|
||||
private readonly startYear = 2020
|
||||
|
@ -75,7 +77,7 @@ class StatsDownloader {
|
|||
|
||||
while (url) {
|
||||
ScriptUtils.erasableLog(`Downloading stats for ${year}-${month}, page ${page} ${url}`)
|
||||
const result = await ScriptUtils.DownloadJSON(url, headers)
|
||||
const result = await Utils.downloadJson(url, headers)
|
||||
page++;
|
||||
allFeatures.push(...result.features)
|
||||
if (result.features === undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue