Skip Menu |

This queue is for tickets about the Gearman-XS CPAN distribution.

Report information
The Basics
Id: 95064
Status: new
Priority: 0/
Queue: Gearman-XS

Owner: Nobody in particular
Requestors: zm_mail [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: set_data_fn cannot be executed successfully
Date: Sat, 26 Apr 2014 18:37:21 +0800
To: bug-Gearman-XS [...]
From: mz <zm_mail [...]>
Download (untitled) / with headers
text/plain 903b
Hi, set_data_fn cannot be executed successfully in Gearmand 1.1.2. For example: in ... $client->set_created_fn(\&created_cb); $client->set_data_fn(\&data_cb); $client->set_complete_fn(\&completed_cb); $client->set_fail_fn(\&fail_cb); $client->set_status_fn(\&status_cb); $ret= $client->run_tasks(); if ($ret != GEARMAN_SUCCESS) { printf(STDERR "%s\n", $client->error()); exit(1); } exit; sub created_cb { my ($task) = @_; printf("Created: %s\n", $task->job_handle()); return GEARMAN_SUCCESS; } sub data_cb { my ($task) = @_; printf("Data: %s %s\n", $task->job_handle(), $task->data()); return GEARMAN_SUCCESS; } ā€¦ The data_cb() cannot be call_backed when worker executes send_data(). If I modified "$client->set_data_fn(\&data_cb);ā€ to "$client->set_data_fn(&data_cb);ā€ , The data_cb() will be call_backed, but $task is wrong. Sincerely, Hansen

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to