summaryrefslogtreecommitdiff
path: root/plugins/jobs/brokers/amqp/item.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-11 10:39:17 +0300
committerValery Piashchynski <[email protected]>2021-07-11 10:39:17 +0300
commit510e19376df7882491e123cbfd2790a04ba31147 (patch)
tree7a294893f4ea125235d056429c490ab4347612ca /plugins/jobs/brokers/amqp/item.go
parent589f759cc2411319adbca2ece0dbe212407d1eba (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.go2
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)