Refactoring

This commit is contained in:
2023-04-13 18:22:17 +03:00
parent f47dbefb67
commit 2b7a33e72d
9 changed files with 73 additions and 43 deletions

View File

@@ -75,6 +75,13 @@ func (p *Page) Process(ctx context.Context, processor Processor) {
innerWG := sync.WaitGroup{}
innerWG.Add(len(p.Formats))
meta, err := processor.GetMeta(ctx, p.URL)
if err != nil {
p.Meta.Error = err.Error()
} else {
p.Meta = meta
}
for _, format := range p.Formats {
go func(format Format) {
defer innerWG.Done()