Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PheanstalkMessage setTimeToRun does'nt work #1

Closed
m1khal3v opened this issue Jul 17, 2019 · 1 comment
Closed

PheanstalkMessage setTimeToRun does'nt work #1

m1khal3v opened this issue Jul 17, 2019 · 1 comment

Comments

@m1khal3v
Copy link

m1khal3v commented Jul 17, 2019

This code doesn't work
public function botAction(Request $request, ProducerInterface $producer)
{
$decoded = json_decode($request->getContent());
$message = json_encode($decoded->message, JSON_UNESCAPED_UNICODE);
$pheanstalkMessage = new PheanstalkMessage($message);
$pheanstalkMessage->setTimeToRun(60 * 60 * 3);
$producer->sendCommand(
Commands::PROCESS_MESSAGE,
$pheanstalkMessage
);

return new Response();

}

This code works well
public function botAction(Request $request, ProducerInterface $producer)
{
$decoded = json_decode($request->getContent());
$message = json_encode($decoded->message, JSON_UNESCAPED_UNICODE);
$pheanstalkMessage = new Message($message);
$pheanstalkMessage->setHeader('ttr', 60 * 60 * 3);
$producer->sendCommand(
Commands::PROCESS_MESSAGE,
$pheanstalkMessage
);

return new Response();

}

@makasim
Copy link
Member

makasim commented Jul 17, 2019

Please open issue on main repo https://github.com/php-enqueue/enqueue-dev

This one is a read-only mirror.

Thanks

@makasim makasim closed this as completed Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants