projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2dae012
)
move create_user to perl API
author
root
<root@rsync1.maxxo.com>
Wed, 11 Apr 2012 20:25:36 +0000
(22:25 +0200)
committer
root
<root@rsync1.maxxo.com>
Wed, 11 Apr 2012 20:25:36 +0000
(22:25 +0200)
gearman/send_file.pl
patch
|
blob
|
history
diff --git
a/gearman/send_file.pl
b/gearman/send_file.pl
index
4c5820f
..
a3eabd6
100755
(executable)
--- a/
gearman/send_file.pl
+++ b/
gearman/send_file.pl
@@
-21,6
+21,21
@@
use Gearman::Worker;
my $worker = Gearman::Worker->new;
$worker->job_servers('127.0.0.1:4730');
my $worker = Gearman::Worker->new;
$worker->job_servers('127.0.0.1:4730');
+=head2 create_user
+
+=cut
+
+$worker->register_function( create_user => sub {
+ my ($job) = @_;
+
+ my $work = $job->arg;
+ chomp $work;
+ warn "# create_user [$work]\n";
+ my ( $email, $password, $quota ) = split(/\s+/,$work,3);
+ $quota ||= 200000 && warn "default quota";
+ $api->create_user( $email, $password, $quota );
+});
+
=head2 send_file ~u2001/from.txt#~u2003/dir/new to.txt
=cut
=head2 send_file ~u2001/from.txt#~u2003/dir/new to.txt
=cut