File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
- package service
1
+ package dto
2
2
3
3
import "go.mongodb.org/mongo-driver/bson/primitive"
4
4
Original file line number Diff line number Diff line change 5
5
"log"
6
6
"time"
7
7
8
+ localDTO "github.com/mtanzim/event-driven-bookstore/warehouse-server/dto"
8
9
"go.mongodb.org/mongo-driver/bson"
10
+
9
11
"go.mongodb.org/mongo-driver/mongo"
10
12
"go.mongodb.org/mongo-driver/mongo/options"
11
13
)
@@ -35,7 +37,7 @@ func (s DLQMonitorService) Monitor() {
35
37
log .Println (err )
36
38
}
37
39
for cur .Next (ctx ) {
38
- var item CartPaymentDLQItem
40
+ var item localDTO. CartPaymentDLQItem
39
41
curErr := cur .Decode (& item )
40
42
log .Println ("In payment DLQ" , item )
41
43
if curErr == nil {
Original file line number Diff line number Diff line change 7
7
"time"
8
8
9
9
dto "github.com/mtanzim/event-driven-bookstore/common-server/dto"
10
+ localDTO "github.com/mtanzim/event-driven-bookstore/warehouse-server/dto"
10
11
"go.mongodb.org/mongo-driver/bson"
11
12
"go.mongodb.org/mongo-driver/mongo"
12
13
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
@@ -51,7 +52,7 @@ func (s PaymentStatusService) persist(paymentStatus dto.CartPaymentResponse) {
51
52
if err != nil || updateRes .ModifiedCount != 1 {
52
53
log .Println ("Failed to update shipment payment status for cart id:" , paymentStatus .CartID )
53
54
log .Println ("Inserting approved payment into DLQ" )
54
- failedCartItem := CartPaymentDLQItem {CartID : paymentStatus .CartID }
55
+ failedCartItem := localDTO. CartPaymentDLQItem {CartID : paymentStatus .CartID }
55
56
s .paymentDLQCollection .InsertOne (ctx , failedCartItem )
56
57
} else {
57
58
log .Println ("Shipment" , paymentStatus .CartID , "was paid for!" )
You can’t perform that action at this time.
0 commit comments