forked from MapComplete/MastodonBot
Add some debug output
This commit is contained in:
parent
c00fe1a811
commit
9e697f170f
1 changed files with 2 additions and 0 deletions
|
@ -67,6 +67,7 @@ export class Main {
|
||||||
for (let i = 0; i < days; i++) {
|
for (let i = 0; i < days; i++) {
|
||||||
const targetDay = new Date(today.getTime() - 24 * 60 * 60 * 1000 * (i + 1))
|
const targetDay = new Date(today.getTime() - 24 * 60 * 60 * 1000 * (i + 1))
|
||||||
let changesetsDay: ChangeSetData[] = await osmcha.DownloadStatsForDay(targetDay.getUTCFullYear(), targetDay.getUTCMonth() + 1, targetDay.getUTCDate())
|
let changesetsDay: ChangeSetData[] = await osmcha.DownloadStatsForDay(targetDay.getUTCFullYear(), targetDay.getUTCMonth() + 1, targetDay.getUTCDate())
|
||||||
|
console.log("OsmCha has", changesets.length,"changesets for", targetDay.toISOString())
|
||||||
for (const changeSetDatum of changesetsDay) {
|
for (const changeSetDatum of changesetsDay) {
|
||||||
if (changeSetDatum.properties.theme === undefined) {
|
if (changeSetDatum.properties.theme === undefined) {
|
||||||
console.warn("Changeset", changeSetDatum.id, " does not have theme given")
|
console.warn("Changeset", changeSetDatum.id, " does not have theme given")
|
||||||
|
@ -76,6 +77,7 @@ export class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
console.log("Found",changesets.length,"matching changesets")
|
||||||
|
|
||||||
if (action.themeWhitelist?.length > 0) {
|
if (action.themeWhitelist?.length > 0) {
|
||||||
const allowedThemes = new Set(action.themeWhitelist)
|
const allowedThemes = new Set(action.themeWhitelist)
|
||||||
|
|
Loading…
Reference in a new issue