This commit is contained in:
parent
ae0a07ae1b
commit
2fa14a7797
3 changed files with 156 additions and 22 deletions
|
|
@ -42,17 +42,19 @@ func (s *Parser) worker(ctx context.Context, receiver chan shared.Task, sender c
|
|||
//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{
|
||||
MerchUuid: task.MerchUuid,
|
||||
Origin: task.Origin,
|
||||
Price: zeroPrice,
|
||||
}
|
||||
continue
|
||||
}
|
||||
//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{
|
||||
// MerchUuid: task.MerchUuid,
|
||||
// Origin: task.Origin,
|
||||
// Price: zeroPrice,
|
||||
// }
|
||||
// continue
|
||||
//}
|
||||
|
||||
//price will be zeroPrice value in case of any error or if price not found
|
||||
price := s.getMinimalPrice(task)
|
||||
sender <- shared.TaskResult{
|
||||
MerchUuid: task.MerchUuid,
|
||||
Origin: task.Origin,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue