Remove static batch report resolution

This commit is contained in:
2026-06-17 16:07:40 +00:00
parent a9d87bdbaa
commit 3eccafad6b
6 changed files with 21 additions and 167 deletions

View File

@@ -272,7 +272,7 @@ func RunBatchDetailed(ctx context.Context, req BatchRequest) (*BatchResult, erro
if err != nil {
return nil, err
}
plannedReports, err := planBatchReports(req, now, *collection)
plannedReports, err := planBatchRun(req, now, *collection)
if err != nil {
return nil, err
}
@@ -398,25 +398,6 @@ func ResolveGenerate(req GenerateRequest, now time.Time) (report.Resolved, error
})
}
func ResolveBatch(req BatchRequest, now time.Time) ([]report.Resolved, error) {
location, err := timeutil.LoadLocation(req.Config.WeatherAPI.Timezone)
if err != nil {
return nil, err
}
batch, err := report.BatchForCommandName(string(req.Batch))
if err != nil {
return nil, err
}
registry, err := reportRegistry(req.Config)
if err != nil {
return nil, err
}
return registry.BatchReports(batch, report.ResolveRequest{
Now: now,
Location: location,
})
}
func reportRegistry(cfg config.Config) (report.Registry, error) {
overrides, err := cfg.ReportModuleOverrides()
if err != nil {