diff options
author | Valery Piashchynski <[email protected]> | 2021-07-11 10:39:17 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-11 10:39:17 +0300 |
commit | 510e19376df7882491e123cbfd2790a04ba31147 (patch) | |
tree | 7a294893f4ea125235d056429c490ab4347612ca /plugins/jobs/brokers/amqp/item.go | |
parent | 589f759cc2411319adbca2ece0dbe212407d1eba (diff) |
unpack: use fast string convert
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/brokers/amqp/item.go')
-rw-r--r-- | plugins/jobs/brokers/amqp/item.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/jobs/brokers/amqp/item.go b/plugins/jobs/brokers/amqp/item.go index 06e2bf56..731e6a2b 100644 --- a/plugins/jobs/brokers/amqp/item.go +++ b/plugins/jobs/brokers/amqp/item.go @@ -174,7 +174,7 @@ func pack(id string, j *Item) (amqp.Table, error) { // unpack restores jobs.Options func unpack(d amqp.Delivery) (id string, j *Item, err error) { - j = &Item{Payload: string(d.Body), Options: &Options{}} + j = &Item{Payload: utils.AsString(d.Body), Options: &Options{}} if _, ok := d.Headers[rrID].(string); !ok { return "", nil, fmt.Errorf("missing header `%s`", rrID) |