Public Access
1
0

chore: improve postal data import observability

Add progress logging and a status script for postal imports and neighbor builds, and ignore local raw and generated postal datasets.
This commit is contained in:
pguerrerox
2026-04-12 23:22:36 +00:00
parent cc00a439bf
commit dc7686f507
11 changed files with 267 additions and 23 deletions
+22
View File
@@ -0,0 +1,22 @@
export function createScriptLogger(prefix: string) {
const startedAt = Date.now();
function elapsed() {
const totalSeconds = Math.floor((Date.now() - startedAt) / 1000);
const minutes = Math.floor(totalSeconds / 60);
const seconds = totalSeconds % 60;
return `${minutes}m ${seconds}s`;
}
return {
info(message: string) {
console.log(`[${prefix}] ${message} (${elapsed()})`);
},
warn(message: string) {
console.warn(`[${prefix}] ${message} (${elapsed()})`);
},
error(message: string) {
console.error(`[${prefix}] ${message} (${elapsed()})`);
},
};
}