0

What is this command GearmanWorker.set_client_id(client_id) ? http://packages.python.org/gearman/worker.html#gearman.worker.GearmanWorker.set_client_id

It means that the worker only serves clients with the specified id ? If yes how can I find a client's id.

Giorgos Komnino
  • 433
  • 1
  • 7
  • 20

1 Answers1

0

From the docs of Gearman protocol:

SET_CLIENT_ID

    This sets the worker ID in a job server so monitoring and reporting
    commands can uniquely identify the various workers, and different
    connections to job servers from the same worker.

So it does not have anything to do with worker-client relationship. That is only handled by the function handle that the client is passing and the worker is registering for. This ID is probably seen in administrative commands' output and can help you in debugging / monitoring your application. As a matter of fact, some interfaces (e.g. PHP) do not support this setting and are still fully usable.

Mayank Jaiswal
  • 12,338
  • 7
  • 39
  • 41
Aurimas
  • 2,518
  • 18
  • 23