Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
maestre3d committed Dec 26, 2020
1 parent 9ec4d01 commit 946a118
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions worker_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package quark

import (
"context"
"log"
)

type awsWorker struct {
Expand All @@ -20,11 +19,9 @@ func (a *awsWorker) Parent() *node {
}

func (a *awsWorker) StartJob(ctx context.Context) error {
log.Print(a.parent.Consumer.topics, a.parent.setDefaultProvider())
return nil
}

func (a *awsWorker) Close() error {
log.Print(a.parent.Consumer.topics, "closing worker")
return nil
}
5 changes: 0 additions & 5 deletions worker_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package quark
import (
"context"
"errors"
"log"
"time"

"github.com/Shopify/sarama"
Expand All @@ -29,7 +28,6 @@ func (k *kafkaWorker) Parent() *node {
}

func (k *kafkaWorker) StartJob(ctx context.Context) error {
log.Printf("topics: %v | worker_id: %d | provider: %s", k.parent.Consumer.topics, k.id, k.parent.setDefaultProvider())
if err := k.ensureGroup(); err != nil {
return err
} else if len(k.parent.Consumer.topics) > 1 || k.parent.Consumer.group != "" {
Expand Down Expand Up @@ -127,19 +125,16 @@ func (k *kafkaWorker) startConsumer(ctx context.Context) error {
func (k *kafkaWorker) Close() error {
errs := new(multierror.Error)
if k.group != nil {
log.Printf("topics: %v | worker_id: %d | closing worker", k.parent.Consumer.topics, k.id)
if err := k.group.Close(); err != nil {
errs = multierror.Append(errs, err)
}
}
if k.consumer != nil {
log.Printf("topics: %v | worker_id: %d | closing worker", k.parent.Consumer.topics, k.id)
if err := k.consumer.Close(); err != nil {
errs = multierror.Append(errs, err)
}
}
if k.partitioner != nil {
log.Printf("topics: %v | worker_id: %d | closing worker", k.parent.Consumer.topics, k.id)
if err := k.partitioner.Close(); err != nil {
errs = multierror.Append(errs, err)
}
Expand Down

0 comments on commit 946a118

Please sign in to comment.