Skip to content

Commit 358caea

Browse files
committed
Minor clean up
1 parent dd35de8 commit 358caea

File tree

5 files changed

+3
-47
lines changed

5 files changed

+3
-47
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Marsel Mavletkulov
3+
Copyright (c) 2025 Marsel Mavletkulov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ $ go run ./consumer/
109109
received a=fizz b=bazz
110110
```
111111

112-
To send a task with Celery Protocol version 1, run *producer_v1.py* instead of *producer.py*.
113-
114112
</details>
115113

116114
<details>
@@ -179,7 +177,6 @@ $ go run ./retry/
179177

180178
</details>
181179

182-
183180
### RabbitMQ Examples
184181

185182
RabbitMQ examples can be found in [the rabbitmq examples](examples/rabbitmq) dir.
@@ -217,11 +214,8 @@ $ go run ./consumer/
217214
received a=fizz b=bazz
218215
```
219216

220-
To send a task with Celery Protocol version 1, run *producer_v1.py* instead of *producer.py*.
221-
222217
</details>
223218

224-
225219
## Testing
226220

227221
Tests require both a Redis and a RabbitMQ server running locally.

examples/producer.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

rabbitmq/broker.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ func WithReceiveTimeout(timeout time.Duration) BrokerOption {
5353
}
5454
}
5555

56-
// WithRawMode sets rawMode, which, if true, disables marshaling of data structures between internal and RabbitMQ Celery formats.
57-
// Note that rawMode defaults to false, and should only be set to true inside the broker unit tests.
58-
func WithRawMode(rawMode bool) BrokerOption {
59-
return func(br *Broker) {
60-
br.rawMode = rawMode
61-
}
62-
}
63-
6456
// WithClient sets RabbitMQ client representing a connection to RabbitMQ.
6557
func WithClient(c *amqp.Connection) BrokerOption {
6658
return func(br *Broker) {

rabbitmq/broker_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
)
99

1010
func TestReceive(t *testing.T) {
11-
1211
q := "rabbitmqq"
1312

1413
tests := map[string]struct {
@@ -35,7 +34,8 @@ func TestReceive(t *testing.T) {
3534

3635
for name, tc := range tests {
3736
t.Run(name, func(t *testing.T) {
38-
br := NewBroker(WithReceiveTimeout(time.Second), WithRawMode(true))
37+
br := NewBroker(WithReceiveTimeout(time.Second))
38+
br.rawMode = true
3939
br.Observe([]string{q})
4040

4141
t.Cleanup(func() {

0 commit comments

Comments
 (0)