feat: implement weather radar component and update water resource data records. before river

This commit is contained in:
David Fencl
2026-06-06 21:04:19 +02:00
parent 231961da19
commit ec540e056d
49 changed files with 1038 additions and 198 deletions
+3 -3
View File
@@ -2,11 +2,11 @@ import { execSync } from 'child_process';
// How many minutes after the 10-minute mark should we run the scraper?
// The basin authority (PVL) generates data at HH:00, HH:10, HH:20... but it takes time to publish.
// 5 minutes (HH:05, HH:15...) is a safe buffer to avoid fetching outdated data.
const offsetMinutes = 5;
// 7 minutes (HH:07, HH:17...) is a safe buffer to avoid fetching outdated data.
const offsetMinutes = 7;
console.log(`\n⏱️ HLADINATOR Watcher spuštěn!`);
console.log(`Budu automaticky stahovat nová data vždy v časech končících na ${offsetMinutes} (např. 10:05, 10:15, 10:25...).\nTo zajistí, že má Povodí dostatek času data vygenerovat a nahrát.\n`);
console.log(`Budu automaticky stahovat nová data vždy v časech končících na ${offsetMinutes} (např. 10:07, 10:17, 10:27...).\nTo zajistí, že má Povodí dostatek času data vygenerovat a nahrát.\n`);
function runUpdate() {
const now = new Date().toLocaleTimeString('cs-CZ');