forked from gsn/predictor
added simulate stages. Changed GSN_PREDICTOR_GRIB_TTL to 48h
This commit is contained in:
parent
c4f355a32e
commit
fe207f3fab
21 changed files with 978 additions and 137 deletions
27
force_update.ps1
Normal file
27
force_update.ps1
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue