basic app
This commit is contained in:
parent
0a6e246a5c
commit
8d6c2b6687
30 changed files with 1469 additions and 0 deletions
18
internal/processor/worker.go
Normal file
18
internal/processor/worker.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package processor
|
||||
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"parsing-service/internal/shared"
|
||||
)
|
||||
|
||||
const zeroPrice = 0 //for debug purposes
|
||||
|
||||
func (p *Processor) worker(in <-chan shared.Task) {
|
||||
for task := range in {
|
||||
err := p.handlers[task.Origin].HandleTask(task, p.out, p.state)
|
||||
if err != nil {
|
||||
log.WithField("err", err).Error("Worker | Handle task")
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue