【问题标题】:Gearman worker client_id pythonGearman工人client_id python
【发布时间】:2012-06-08 08:21:32
【问题描述】:

这个命令是什么 GearmanWorker.set_client_id(client_id) ? http://packages.python.org/gearman/worker.html#gearman.worker.GearmanWorker.set_client_id

这意味着worker只为具有指定id的客户提供服务? 如果是,我怎样才能找到客户的 id。

【问题讨论】:

  • 我认为这是给定名称的服务器上的函数注册工作者。

标签: python gearman


【解决方案1】:

来自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.

所以它与工人-客户关系没有任何关系。这仅由客户端传递且工作人员正在注册的函数句柄处理。此 ID 可能出现在管理命令的输出中,可以帮助您调试/监控您的应用程序。事实上,有些接口(例如 PHP)不支持此设置,但仍然完全可用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多