From 0895be4b8fc8e166d26480a5fb6b785c855d5080 Mon Sep 17 00:00:00 2001 From: "afanasyev.aa" Date: Tue, 9 Dec 2025 18:37:36 +0900 Subject: [PATCH] removed scripts --- force_update.bat | 23 ----------------------- force_update.ps1 | 27 --------------------------- internal/pkg/grib/config.go | 4 ++-- run.bat | 12 ------------ run.ps1 | 11 ----------- 5 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 force_update.bat delete mode 100644 force_update.ps1 delete mode 100644 run.bat delete mode 100644 run.ps1 diff --git a/force_update.bat b/force_update.bat deleted file mode 100644 index 2dc3a3b..0000000 --- a/force_update.bat +++ /dev/null @@ -1,23 +0,0 @@ -@echo off -REM Batch script to force download fresh GRIB data -REM This deletes old cube files and downloads the latest dataset - -echo Forcing fresh GRIB data download... -echo. - -REM Set environment -set GSN_PREDICTOR_GRIB_DIR=C:\tmp\grib -set GSN_PREDICTOR_GRIB_TTL=72h - -REM Delete old cube files to force fresh download -echo Deleting old cube files... -del /Q C:\tmp\grib\*.cube 2>nul -echo. - -echo Starting service to download fresh data... -echo This will download from S3 (may take several minutes) -echo Press Ctrl+C once download completes and you see "initial GRIB update complete" -echo. - -REM Run the service - it will download fresh data on startup -go run cmd/api/main.go diff --git a/force_update.ps1 b/force_update.ps1 deleted file mode 100644 index e911409..0000000 --- a/force_update.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# PowerShell script to force download fresh GRIB data -# This deletes old cube files and downloads the latest dataset - -Write-Host "Forcing fresh GRIB data download..." -ForegroundColor Yellow - -# Set environment -$env:GSN_PREDICTOR_GRIB_DIR = "C:\tmp\grib" -$env:GSN_PREDICTOR_GRIB_TTL = "72h" - -# Delete old cube files to force fresh download -$cubeFiles = Get-ChildItem -Path "C:\tmp\grib\*.cube" -ErrorAction SilentlyContinue -if ($cubeFiles) { - Write-Host "Deleting old cube files:" -ForegroundColor Yellow - foreach ($file in $cubeFiles) { - Write-Host " - $($file.Name)" -ForegroundColor Gray - Remove-Item $file.FullName -Force - } -} else { - Write-Host "No old cube files found" -ForegroundColor Gray -} - -Write-Host "`nStarting service to download fresh data..." -ForegroundColor Green -Write-Host "This will download from S3 (may take several minutes)" -ForegroundColor Cyan -Write-Host "Press Ctrl+C once download completes and you see 'initial GRIB update complete'`n" -ForegroundColor Cyan - -# Run the service - it will download fresh data on startup -go run cmd/api/main.go diff --git a/internal/pkg/grib/config.go b/internal/pkg/grib/config.go index 009645d..0132a92 100644 --- a/internal/pkg/grib/config.go +++ b/internal/pkg/grib/config.go @@ -8,8 +8,8 @@ import ( ) type Config struct { - Dir string `env:"DIR" envDefault:"/tmp/grib"` - TTL time.Duration `env:"TTL" envDefault:"24h"` + Dir string `env:"DIR" envDefault:"C:/tmp/grib"` + TTL time.Duration `env:"TTL" envDefault:"48h"` CacheTTL time.Duration `env:"CACHE_TTL" envDefault:"1h"` Parallel int `env:"PARALLEL" envDefault:"8"` DatasetURL string `env:"DATASET_URL" envDefault:"https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod"` diff --git a/run.bat b/run.bat deleted file mode 100644 index 5cb20f1..0000000 --- a/run.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -REM Batch startup script for predictor service -REM Sets required environment variables and starts the service - -set GSN_PREDICTOR_GRIB_DIR="c://tmp/grib" -set GSN_PREDICTOR_GRIB_TTL=48h - -echo Starting predictor service with GRIB directory: %GSN_PREDICTOR_GRIB_DIR% -echo Dataset TTL: %GSN_PREDICTOR_GRIB_TTL% - -REM Run the service -go run cmd/api/main.go diff --git a/run.ps1 b/run.ps1 deleted file mode 100644 index 67904c2..0000000 --- a/run.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -# PowerShell startup script for predictor service -# Sets required environment variables and starts the service - -$env:GSN_PREDICTOR_GRIB_DIR = "C:/tmp/grib" -$env:GSN_PREDICTOR_GRIB_TTL = "48h" # Allow datasets up to 48 hours old - -Write-Host "Starting predictor service with GRIB directory: $env:GSN_PREDICTOR_GRIB_DIR" -ForegroundColor Green -Write-Host "Dataset TTL: $env:GSN_PREDICTOR_GRIB_TTL" -ForegroundColor Green - -# Run the service -go run cmd/api/main.go