add tasks does not seem to copy workload correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman::XS |
Fix Released
|
High
|
Dennis Schön |
Bug Description
#!/usr/bin/perl -w
$|++;
use strict;
use warnings;
use Gearman:
use Gearman::XS qw(:constants);
my $client = new Gearman:
my $ret = $client-
$client-
$client-
for my $n (1..5) {
my ($rv, $task) = $client-
if ($rv != GEARMAN_SUCCESS) {
die $client-
}
print "server: task added with data: $n ha\n";
}
$client-
sub complete {
my ($task) = @_;
my $data = $task->data();
print "server: complete called with data: $data\n";
return GEARMAN_SUCCESS;
}
sub created {
my ($task) = @_;
print "server: created called with job: " . $task->job_handle() . "\n";
return GEARMAN_SUCCESS;
}
exit;
---
result
---
server: task added with data: 1 ha
server: task added with data: 2 ha
server: task added with data: 3 ha
server: task added with data: 4 ha
server: task added with data: 5 ha
server: created called with job: H:degobah:135
server: created called with job: H:degobah:136
server: created called with job: H:degobah:137
server: created called with job: H:degobah:138
server: created called with job: H:degobah:139
server: complete called with data: ah 5
server: complete called with data: ah 5
server: complete called with data: ah 5
server: complete called with data: ah 5
server: complete called with data: ah 5
---
worker result
---
Job=H:degobah:135 Workload=5 ha Result=ah 5
Job=H:degobah:136 Workload=5 ha Result=ah 5
Job=H:degobah:137 Workload=5 ha Result=ah 5
Job=H:degobah:138 Workload=5 ha Result=ah 5
Job=H:degobah:139 Workload=5 ha Result=ah 5
Related branches
Changed in gearmanxs: | |
assignee: | nobody → Dennis Schön (roccoblues) |
importance: | Undecided → High |
milestone: | none → 0.2 |
status: | New → Confirmed |
Changed in gearmanxs: | |
status: | Confirmed → Fix Committed |
Changed in gearmanxs: | |
status: | Fix Committed → Fix Released |
Works like a charm, good work.