Skip to content

Commit

Permalink
fix: fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
liaosunny123 committed Aug 31, 2023
1 parent 61b9d32 commit 89ca60a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ require (
github.com/robfig/cron/v3 v3.0.0
github.com/sashabaranov/go-openai v1.14.2
github.com/sirupsen/logrus v1.9.3
github.com/streadway/amqp v1.1.0
github.com/stretchr/testify v1.8.4
github.com/willf/bloom v2.0.3+incompatible
github.com/zsais/go-gin-prometheus v0.1.0
Expand Down
2 changes: 1 addition & 1 deletion src/services/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func addMessage(ctx context.Context, fromUserId uint32, toUserId uint32, Context

} else {

err = channel.Publish("", strings.MessageActionEvent, false, false,
err = channel.PublishWithContext(ctx, "", strings.MessageActionEvent, false, false,
amqp.Publishing{
DeliveryMode: amqp.Persistent,
ContentType: "text/plain",
Expand Down
4 changes: 0 additions & 4 deletions src/services/message/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import (
"os"
"syscall"

grpcprom "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
"github.com/oklog/run"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/sirupsen/logrus"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"google.golang.org/grpc"
Expand Down
3 changes: 1 addition & 2 deletions src/services/msgconsumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
amqp "github.com/rabbitmq/amqp091-go"
"github.com/sashabaranov/go-openai"
"github.com/sirupsen/logrus"
"github.com/streadway/amqp"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -393,7 +392,7 @@ func errorHandler(channel *amqp.Channel, d amqp.Delivery, requeue bool, logger *

logger.Debugf("Retrying %d times", curRetry)

err = channel.Publish(
err = channel.PublishWithContext(context.Background(),
strings.MessageExchange,
strings.MessageGptActionEvent,
false,
Expand Down

0 comments on commit 89ca60a

Please sign in to comment.