Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jun 15, 2022
1 parent 5acf569 commit f37d645
Show file tree
Hide file tree
Showing 4 changed files with 390 additions and 52 deletions.
7 changes: 3 additions & 4 deletions core/msgio/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
"github.com/edganiukov/fcm"
"github.com/nyaruka/mailroom/core/models"
"github.com/nyaruka/mailroom/runtime"

"github.com/apex/log"
"github.com/sirupsen/logrus"
)

// SendMessages tries to send the given messages via Courier or Android syncing
Expand Down Expand Up @@ -54,7 +53,7 @@ func SendMessages(ctx context.Context, rt *runtime.Runtime, tx models.Queryer, f

// not being able to queue a message isn't the end of the world, log but don't return an error
if err != nil {
log.WithField("messages", contactMsgs).WithField("contact", contactID).WithError(err).Error("error queuing messages")
logrus.WithField("messages", contactMsgs).WithField("contact", contactID).WithError(err).Error("error queuing messages")

// in the case of errors we do want to change the messages back to pending however so they
// get queued later. (for the common case messages are only inserted and queued, without a status update)
Expand All @@ -76,7 +75,7 @@ func SendMessages(ctx context.Context, rt *runtime.Runtime, tx models.Queryer, f
if len(pending) > 0 {
err := models.MarkMessagesPending(ctx, tx, pending)
if err != nil {
log.WithError(err).Error("error marking message as pending")
logrus.WithError(err).Error("error marking message as pending")
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ go 1.18

require (
github.com/Masterminds/semver v1.5.0
github.com/apex/log v1.1.4
github.com/aws/aws-sdk-go v1.44.34
github.com/buger/jsonparser v1.1.1
github.com/edganiukov/fcm v0.4.0
github.com/go-chi/chi v4.1.2+incompatible
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/protobuf v1.5.2
github.com/gomodule/redigo v1.8.8
github.com/gorilla/schema v1.1.0
github.com/gorilla/schema v1.2.0
github.com/jmoiron/sqlx v1.3.5
github.com/lib/pq v1.10.6
github.com/nyaruka/ezconf v0.2.1
Expand All @@ -25,7 +24,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.9.1
github.com/prometheus/common v0.34.0
github.com/shopspring/decimal v1.3.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.2
Expand All @@ -34,7 +33,7 @@ require (

require (
github.com/Shopify/gomail v0.0.0-20220314142144-6897a5a5ba29 // indirect
github.com/antlr/antlr4 v0.0.0-20200701161529-3d9351f61e0f // indirect
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220527190237-ee62e23da966 // indirect
github.com/blevesearch/segment v0.9.0 // indirect
github.com/certifi/gocertifi v0.0.0-20200211180108-c7c1fbc02894 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
Loading

0 comments on commit f37d645

Please sign in to comment.