This commit is contained in:
parent
784a1a74ff
commit
ae0a07ae1b
2 changed files with 47 additions and 3 deletions
|
|
@ -37,10 +37,12 @@ func (s *Parser) worker(ctx context.Context, receiver chan shared.Task, sender c
|
|||
for task := range receiver {
|
||||
log.WithField("task_uuid", task.MerchUuid).Debug(logHeader + logWorker + "processing task")
|
||||
|
||||
pageCtx, pageCancel := chromedp.NewContext(ctx, chromedp.WithLogf(func(string, ...any) {}))
|
||||
//pageCtx, pageCancel := chromedp.NewContext(ctx, chromedp.WithLogf(func(string, ...any) {}))
|
||||
//
|
||||
//price, err := s.getPrice(pageCtx, task)
|
||||
//pageCancel()
|
||||
|
||||
price, err := s.getPrice(pageCtx, task)
|
||||
pageCancel()
|
||||
price, err := s.getMinimalPrice(task)
|
||||
if err != nil {
|
||||
log.WithField("task_uuid", task.MerchUuid).Warn(logHeader + logWorker + logTaskWarning + "failed to process, zero price")
|
||||
sender <- shared.TaskResult{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue