projects
/
APKPM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66bef85
)
added do with json decode
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 13 Mar 2011 17:20:32 +0000
(18:20 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 13 Mar 2011 17:20:32 +0000
(18:20 +0100)
lib/APKPM/Gearman/Client.pm
patch
|
blob
|
history
diff --git
a/lib/APKPM/Gearman/Client.pm
b/lib/APKPM/Gearman/Client.pm
index
0347557
..
61930d7
100644
(file)
--- a/
lib/APKPM/Gearman/Client.pm
+++ b/
lib/APKPM/Gearman/Client.pm
@@
-26,4
+26,12
@@
sub do_background_json {
$self->gc->dispatch_background( $func, JSON::XS::encode_json($args) );
}
+sub do {
+ my ( $self, $func, $args ) = @_;
+ warn "# do ",dump( $func,$args );
+ my $ret = $self->gc->do_task( $func, $args );
+ warn "## $func $args = ",dump($ret);
+ return JSON::XS::decode_json $$ret;
+}
+
1;