Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.

Commit d918fed

Browse files
author
Thomas Rideout
committed
fix for laravel not passing queue in the job payload
1 parent 1098f93 commit d918fed

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/IronQueue.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,19 @@ public function setRequest(Request $request)
267267
$this->request = $request;
268268
}
269269

270+
protected function createPayload($job, $data = '', $queue = null)
271+
{
272+
$payload = json_encode($this->createPayloadArray($job, $data, $queue));
273+
274+
if (JSON_ERROR_NONE !== json_last_error()) {
275+
throw new InvalidPayloadException(
276+
'Unable to JSON encode payload. Error code: '.json_last_error()
277+
);
278+
}
279+
280+
return $payload;
281+
}
282+
270283
/**
271284
* Create a payload array from the given job and data.
272285
*

0 commit comments

Comments
 (0)