I currently have the following:
try {
$pheanstalk->useTube($tube)->put($data);
} catch (\Exception $e) {
$logger = $this->container->get('logger');
$logger->info('Could not reach beanstalk: ' . $e);
}
This works fine, but I want to have it where $pheanstalk->useTube($tube)->put($data)
doesn't wait for a connection response from the server, and will just try to attempt to put the data on the queue and then continue on its merry way. The data this service is storing is nice to have, but isn't critical. Thus, during heavy load times I'd like to not have to wait for the timeout period before being able to continue with the rest of the program. How do I eliminate the wait for a response from the server part of pheanstalk?