php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62505 php setCompleteCallback not working
Submitted: 2012-07-08 01:24 UTC Modified: 2017-01-10 08:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: hradtke@php.net Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: Irrelevant OS:
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: hradtke@php.net
New email:
PHP Version: OS:

 

 [2012-07-08 01:24 UTC] hradtke@php.net
Description:
------------
Posting this so it ends up in the archive where others might find it ....  if 
your setCompleteCallback is not working this may be why.



I spent several hours friday trying to debug code that used to work and stopped 
when we updated the libgearman php library.  What I eventually found is that 
with extension 0.8.1 and libgearman 33 the setCompleteCallback() MUST happen 
*before * calling addTask().    This doesn't appear to have been the case with 
earlier libgearman versions



What we had was



$gmclient->addTask('foo','bar');

$gmclient->setCompleteCallback('foodone');

$gmclient->runTasks();



That does not work - however this does.



$gmclient->setCompleteCallback('foodone');

$gmclient->addTask('foo','bar');

$gmclient->runTasks();



Not helped by having an old version of libgearman on my dev box where it did 
work.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-04 15:43 UTC] gearman at mailinator dot com
setCompleteCallback() only works with addTask and not with doNormal, doBackground, 
addBackgroundTasks.


Perhaps this should be noted in the documentation
 [2017-01-10 08:22 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:22 UTC] kalle@php.net
The gearman extension have not had much activity in the past few years, so I'm taking the safe bet that this is no longer under active development (as I don't consider the typo fixes on the github repo an active development), besides that it also targets unsupported PHP versions. Please unsuspend this report in case it begins to blossom with life once more
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC