Skip to content

Commit 33a10ed

Browse files
committed
remove mspack encoding
1 parent d69b010 commit 33a10ed

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

handler.go

-6
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ func (h *reflectFunc) fnArgs(msg *Message) ([]reflect.Value, error) {
137137

138138
for i := 0; i < len(in); i++ {
139139
arg := reflect.New(h.ft.In(inStart + i)).Elem()
140-
err = dec.DecodeValue(arg)
141-
if err != nil {
142-
err = fmt.Errorf(
143-
"disq: decoding arg=%d failed (data=%.100x): %s", i, b, err)
144-
return nil, err
145-
}
146140
in[i] = arg
147141
}
148142

message.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ import (
99

1010
// Message is used as a uniform object for publishing and consuming messages from a queue.
1111
type Message struct {
12-
Ctx context.Context `msgpack:"-"`
12+
Ctx context.Context
1313

14-
ID string `msgpack:"1,omitempty,alias:ID"`
14+
ID string
1515

16-
Name string `msgpack:"-"`
16+
Name string
1717

1818
// Delay specifies the duration the queue must wait
1919
// before executing the message.
20-
Delay time.Duration `msgpack:"-"`
20+
Delay time.Duration
2121

22-
Args []interface{} `msgpack:"-"`
22+
Args []interface{}
2323

24-
ArgsBin []byte `msgpack:"3,alias:ArgsBin"`
24+
ArgsBin []byte
2525

26-
TaskName string `msgpack:"5,alias:TaskName"`
26+
TaskName string
2727

2828
RetryCount int
2929

3030
//Execution time need for localstorage delays
3131
ExecutionTime time.Time
3232

33-
Err error `msgpack:"-"`
33+
Err error
3434
}
3535

3636
func NewMessage(ctx context.Context, args ...interface{}) *Message {

0 commit comments

Comments
 (0)