From a01c184700b8bf0caca721f761c901c0f4cf3b86 Mon Sep 17 00:00:00 2001 From: Daniel Graf Date: Wed, 8 Apr 2026 07:35:13 +0200 Subject: [PATCH 1/3] refactor: remove hardcoded geocoder API settings from update script --- scripts/update.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/update.sh b/scripts/update.sh index fe42cb8..d35280a 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -23,10 +23,6 @@ IMPORT_THREADS="${IMPORT_THREADS:-10}" # --- Remote Machine Settings --- REMOTE_BASE_DIR="/opt/paikka/data" -# --- Geocoder API Settings --- -GEOCODER_ADMIN_URL="http://localhost:8080/admin/refresh-db" -GEOCODER_TEST_URL_BASE="http://localhost:8080/v1/reverse" - # Global variables that will be set by parse_args_and_configure or environment REMOTE_USER="" REMOTE_HOST="" From 5f9ffbe988799f5f57a1c33be8a998459af78aa1 Mon Sep 17 00:00:00 2001 From: "Daniel Graf (aider-ce)" Date: Wed, 8 Apr 2026 07:35:15 +0200 Subject: [PATCH 2/3] feat: add -y flag to import.sh to skip memory check --- scripts/import.sh | 9 ++++++++- scripts/update.sh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/import.sh b/scripts/import.sh index 609b0db..b7c3db2 100755 --- a/scripts/import.sh +++ b/scripts/import.sh @@ -40,6 +40,7 @@ THREADS="" PBF_FILE="" # Parse arguments +SKIP_MEM_CHECK=false while [[ $# -gt 0 ]]; do case $1 in --jar-file) @@ -58,6 +59,10 @@ while [[ $# -gt 0 ]]; do THREADS="$2" shift 2 ;; + -y|--skip-mem-check) + SKIP_MEM_CHECK=true + shift + ;; -h|--help) usage ;; @@ -129,7 +134,7 @@ REQUESTED_MEM_GB=$(echo "$MEMORY" | sed 's/[^0-9]//g') echo "System memory: ${AVAILABLE_MEM_GB}GB available" echo "Requested heap: $MEMORY" -if [ "$REQUESTED_MEM_GB" -gt "$AVAILABLE_MEM_GB" ]; then +if [ "$SKIP_MEM_CHECK" = false ] && [ "$REQUESTED_MEM_GB" -gt "$AVAILABLE_MEM_GB" ]; then echo "" echo "⚠️ WARNING: Requested heap size ($MEMORY) exceeds available memory (${AVAILABLE_MEM_GB}GB)" echo " This may cause the process to be killed by the OOM killer." @@ -141,6 +146,8 @@ if [ "$REQUESTED_MEM_GB" -gt "$AVAILABLE_MEM_GB" ]; then echo "Import cancelled." exit 1 fi +elif [ "$SKIP_MEM_CHECK" = true ]; then + echo "Skipping memory check (--skip-mem-check flag used)" fi # Build JVM arguments with memory management optimizations diff --git a/scripts/update.sh b/scripts/update.sh index d35280a..db32b08 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -116,6 +116,7 @@ local_create_import_bundle() { --memory "$IMPORT_MEMORY" \ --threads "$IMPORT_THREADS" \ --data-dir "/import/" \ + --skip-mem-check \ "/download/$PBF_FILTERED_FILE" } From 3468fb13e86f27bc086ec92fccea5a8006380a84 Mon Sep 17 00:00:00 2001 From: "Daniel Graf (aider-ce)" Date: Wed, 8 Apr 2026 07:35:43 +0200 Subject: [PATCH 3/3] feat: add skip memory check option to import script --- scripts/import.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/import.sh b/scripts/import.sh index b7c3db2..ac8fd09 100755 --- a/scripts/import.sh +++ b/scripts/import.sh @@ -17,6 +17,7 @@ usage() { echo " --data-dir PATH Directory to store processed data (default: ./)" echo " --memory SIZE JVM heap size (default: 16g)" echo " --threads NUM Maximum number of import threads (default: half of CPU cores)" + echo " -y, --skip-mem-check Skip memory availability check and warning prompt" echo " -h, --help Show this help message" echo "" echo "Examples:"