Skip to content

Commit

Permalink
Switch production rougecombien from json to csv.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Leduc-Hamel committed Apr 6, 2021
1 parent b0db95b commit 6265507
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion services/rougecombien/pkg/apps/rougecombien.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ func NewRougecombienDev(cfg *config.Config) *Rougecombien {
}

func (r *Rougecombien) Run(ctx context.Context) error {
return r.manager.Perform(jobs.NewJsonJob(r.cfg, r.manager, r.jsonStoreJob), &trieugene.Message{})
httpScraper := scraper.NewHttpScraper(r.cfg)
parser := scraper.NewParser(r.cfg, httpScraper)

return r.manager.Perform(jobs.NewCsvJob(&jobs.CsvJobKwargs{
Cfg: r.cfg,
Manager: r.manager,
StoreJob: r.csvStoreJob,
Parser: parser,
Scraper: httpScraper,
}))
}

func (r *Rougecombien) RunDevelopment(ctx context.Context) error {
Expand Down

0 comments on commit 6265507

Please sign in to comment.