Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
useTube example
$message
=
json_encode
(
[
'body' =>
$body
,
'headers' =>
$headers
,
]
)
;
if
(
false ===
$message
)
{
throw
new
TransportException
(
json_last_error_msg
(
)
)
;
}
try
{
$job
=
$this
->client->
useTube
(
$this
->tube
)
->
put
(
$message
,
PheanstalkInterface::DEFAULT_PRIORITY,
$delay
/ 1000,
$this
->ttr
)
;
}
catch
(
Exception
$exception
)
{
throw
new
TransportException
(
$exception
->
getMessage
(
)
, 0,
$exception
)
;
}
return
(string)
$job
->
getId
(
)
;
}