php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60877 no way to set client_id for a GearmanWorker
Submitted: 2012-01-25 11:54 UTC Modified: 2012-08-06 04:34 UTC
From: sendrossemail+php at gmail dot com Assigned: hradtke (profile)
Status: Closed Package: gearman (PECL)
PHP Version: Irrelevant OS: linux*
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sendrossemail+php at gmail dot com
New email:
PHP Version: OS:

 

 [2012-01-25 11:54 UTC] sendrossemail+php at gmail dot com
Description:
------------
Hi there, firstly thanks for this package!

From what I can see of the docs there does not appear to be a means to set the Worker client_id (part of the gearman spec).

Most other languages allow the setting of this id (which is very useful when writing a gearman monitoring suite)
i.e. http://packages.python.org/gearman/worker.html

I am considering modifying the extension myself, however would like to hear if its a feasible fix (or change depending how you view it).

Regards
Ross

Expected result:
----------------
ip: 127.0.0.1
client_id: testworker.py <-- python worker
tasks: ('reverse',)

ip: 127.0.0.1
client_id: TestWorker.php <-- php woker
tasks: ('reverse')

Actual result:
--------------
ip: 127.0.0.1
client_id: testworker.py <-- python worker
tasks: ('reverse',)

ip: 127.0.0.1
client_id: - <-- php worker - as u can see - is the id which is no good when multiple of the same worker is registered
tasks: ('reverse')

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-02 06:17 UTC] hradtke@php.net
I don't see an option in libgearman to set the client it. I am going to ask Brian 
Aker about why this is.

The python library can do this because it does not use libgearman, but instead 
interfaces with the gearman server directly.
 [2012-02-02 06:17 UTC] hradtke@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: hradtke
 [2012-02-02 06:23 UTC] hradtke@php.net
I take it back. This was just added in libgearman 0.26.
 [2012-08-06 04:34 UTC] hradtke@php.net
Fixed: https://github.com/hradtke/pecl-
gearman/commit/b35e797a4073f97a1e9ea19181b66e9246be49a7
 [2012-08-06 04:34 UTC] hradtke@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC