Comment 1 for bug 1067503

Revision history for this message
Doug Harple (dharple) wrote :

For example, I have a single worker that listens for functions a() and b():

$worker = new GermanWorker();
$worker->addServer();
$worker->addFunction('a', 'a');
$worker->addFunction('b', 'b');
while ($worker->work());

I stop the worker, and I then run a client that does the following:

$client = new GearmanClient();
$client->addServer();
$client->doHighBackground('b', 'whatever');
$client->doLowBackground('a', 'whatever');

If I then start the worker, it will run the low priority task before the high priority task, due to the order in which the functions were added to the worker.