Skip to content

Commit c0b051e

Browse files
authored
Merge pull request #9 from frain-dev/enhancement/msgpack-encoding
remove msgpack encoding
2 parents 507ae79 + 33a10ed commit c0b051e

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
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

+7-5
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ type Message struct {
1313

1414
ID string
1515

16-
TaskName string
16+
Name string
1717

18-
// Delay specifies the duration the worker must wait
18+
// Delay specifies the duration the queue must wait
1919
// before executing the message.
2020
Delay time.Duration
2121

22-
// Args passed to the handler.
23-
Args []interface{}
22+
Args []interface{}
23+
2424
ArgsBin []byte
25-
// The number of times the message has been reserved or released.
25+
26+
TaskName string
27+
2628
RetryCount int
2729

2830
//Execution time need for localstorage delays

0 commit comments

Comments
 (0)