removed scripts

This commit is contained in:
afanasyev.aa 2025-12-09 18:37:36 +09:00
parent fe207f3fab
commit 0895be4b8f
5 changed files with 2 additions and 75 deletions

View file

@ -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

View file

@ -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

View file

@ -8,8 +8,8 @@ import (
) )
type Config struct { type Config struct {
Dir string `env:"DIR" envDefault:"/tmp/grib"` Dir string `env:"DIR" envDefault:"C:/tmp/grib"`
TTL time.Duration `env:"TTL" envDefault:"24h"` TTL time.Duration `env:"TTL" envDefault:"48h"`
CacheTTL time.Duration `env:"CACHE_TTL" envDefault:"1h"` CacheTTL time.Duration `env:"CACHE_TTL" envDefault:"1h"`
Parallel int `env:"PARALLEL" envDefault:"8"` Parallel int `env:"PARALLEL" envDefault:"8"`
DatasetURL string `env:"DATASET_URL" envDefault:"https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod"` DatasetURL string `env:"DATASET_URL" envDefault:"https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod"`

12
run.bat
View file

@ -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

11
run.ps1
View file

@ -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