summaryrefslogtreecommitdiff
path: root/plugins/jobs/protocol.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jobs/protocol.go')
-rw-r--r--plugins/jobs/protocol.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/jobs/protocol.go b/plugins/jobs/protocol.go
index e27f2868..691369d0 100644
--- a/plugins/jobs/protocol.go
+++ b/plugins/jobs/protocol.go
@@ -23,9 +23,10 @@ type protocol struct {
}
type errorResp struct {
- Msg string `json:"message"`
- Requeue bool `json:"requeue"`
- Delay int64 `json:"delay_seconds"`
+ Msg string `json:"message"`
+ Requeue bool `json:"requeue"`
+ Delay int64 `json:"delay_seconds"`
+ Headers map[string][]string `json:"headers"`
}
func handleResponse(resp []byte, jb pq.Item, log logger.Logger) error {
@@ -57,7 +58,7 @@ func handleResponse(resp []byte, jb pq.Item, log logger.Logger) error {
log.Error("error protocol type", "error", er.Msg, "delay", er.Delay, "requeue", er.Requeue)
if er.Requeue {
- err = jb.Requeue(er.Delay)
+ err = jb.Requeue(er.Headers, er.Delay)
if err != nil {
return errors.E(op, err)
}