Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Gearman CPAN distribution.

Report information
The Basics
Id: 56508
Status: resolved
Priority: 0/
Queue: Gearman

People
Owner: info [...] maximka.de
Requestors: EWILHELM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.11
Fixed in: 1.130.001



Subject: using $task->fail("reason goes here") in Gearman::Taskset
Calling $task->fail with no arguments leads to undef being passed to the on_fail handler.
Subject: taskset.fail.patch
diff --git a/lib/Gearman/Taskset.pm b/lib/Gearman/Taskset.pm index 0c09964..a878b69 100644 --- a/lib/Gearman/Taskset.pm +++ b/lib/Gearman/Taskset.pm @@ -208,7 +208,8 @@ sub add_task { if (! $rv) { shift @{ $ts->{need_handle} }; # ditch it, it failed. # this will resubmit it if it failed. - return $task->fail; + return $task->fail("no rv on waiting for packet" . + (defined($rv) ? " $rv" : ": $!")); } } @@ -280,7 +281,7 @@ sub _fail_jshandle { my Gearman::Task $task = shift @$task_list or die "Uhhhh: task_list is empty on work_fail for handle $shandle\n"; - $task->fail; + $task->fail("jshandle fail"); delete $ts->{waiting}{$shandle} unless @$task_list; }
it will be solved in v1.130.001
v1.130 is released.