machine 1 - client using PHP api
$client = new \GearmanClient();
$client->addServer(..);
$client->doBackground('demotask', 'hello world');
machine 2 - workers - not using PHP api, directly in bash:
gearman -w -f demotask -- php -f taskexecutor.php
The taskexecutor is getting run, but $argv
does not contain hello world
as expected.
P.S. not interested in PHP's API and a forever while loop on the second machine. I want gearman to start my script when it needs