@@ -67,7 +67,7 @@ public function release($delay = 0)
6767 $ body = $ this ->amqpMessage ->body ;
6868 $ body = json_decode ($ body , true );
6969
70- $ body ['attempts ' ] = $ this ->attempts () + 1 ;
70+ $ body ['data ' ][ ' attempts ' ] = $ this ->attempts () + 1 ;
7171 $ job = $ body ['job ' ];
7272
7373 //if retry_after option is set use it on failure instead of traditional delay
@@ -77,9 +77,9 @@ public function release($delay = 0)
7777 /** @var QueueContract $queue */
7878 $ queue = $ this ->container ['queue ' ]->connection ();
7979 if ($ delay > 0 ) {
80- $ queue ->later ($ delay , $ job , $ body , $ this ->getQueue ());
80+ $ queue ->later ($ delay , $ job , $ body[ ' data ' ] , $ this ->getQueue ());
8181 } else {
82- $ queue ->push ($ job , $ body , $ this ->getQueue ());
82+ $ queue ->push ($ job , $ body[ ' data ' ] , $ this ->getQueue ());
8383 }
8484
8585 // TODO: IS THIS NECESSARY?
@@ -106,7 +106,7 @@ public function attempts()
106106 {
107107 $ body = json_decode ($ this ->amqpMessage ->body , true );
108108
109- return isset ($ body ['attempts ' ]) ? $ body ['attempts ' ] : 0 ;
109+ return isset ($ body ['data ' ][ ' attempts ' ]) ? $ body[ ' data ' ] ['attempts ' ] : 0 ;
110110 }
111111
112112 /**
0 commit comments