| 2 |
## $Id$ |
## $Id$ |
| 3 |
## ------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
| 4 |
## $Log$ |
## $Log$ |
| 5 |
|
## Revision 1.4 2003/04/18 16:04:03 joko |
| 6 |
|
## new api method: getTaskGroups - returns job groups (just a hash) from some configuration slot |
| 7 |
|
## |
| 8 |
|
## Revision 1.3 2003/04/04 17:29:49 joko |
| 9 |
|
## updated signatures: session-based service |
| 10 |
|
## enabled method protection |
| 11 |
|
## |
| 12 |
|
## Revision 1.2 2003/03/28 03:07:41 joko |
| 13 |
|
## minor fix: 'run_cmd' required here |
| 14 |
|
## |
| 15 |
## Revision 1.1 2003/03/27 15:39:55 joko |
## Revision 1.1 2003/03/27 15:39:55 joko |
| 16 |
## initial commit, jobs -core and -api |
## initial commit, jobs -core and -api |
| 17 |
## |
## |
| 29 |
|
|
| 30 |
#use Data::Dumper; |
#use Data::Dumper; |
| 31 |
#use Data::Mungle::Transform::Deep qw( merge_to expand ); |
#use Data::Mungle::Transform::Deep qw( merge_to expand ); |
| 32 |
#use shortcuts qw( run_cmd ); |
use shortcuts qw( run_cmd ); |
| 33 |
|
|
| 34 |
# get logger instance |
# get logger instance |
| 35 |
my $logger = Log::Dispatch::Config->instance; |
my $logger = Log::Dispatch::Config->instance; |
| 57 |
my $procs = [ |
my $procs = [ |
| 58 |
{ |
{ |
| 59 |
name => "getTaskList", |
name => "getTaskList", |
| 60 |
version => "0.02", |
version => "0.03", |
| 61 |
hidden => 0, |
hidden => 0, |
| 62 |
code => \&getTaskList, |
code => \&getTaskList, |
| 63 |
signature => [ 'struct string' ], |
signature => [ |
| 64 |
|
'struct string', # w/o session |
| 65 |
|
'struct string struct', # session initialized (a struct containing a key 'RPCSESSID' will get propagated!) |
| 66 |
|
], |
| 67 |
help => "", |
help => "", |
| 68 |
|
protected => 1, |
| 69 |
}, |
}, |
| 70 |
{ |
{ |
| 71 |
name => "getTaskInfo", |
name => "getTaskInfo", |
| 74 |
code => \&getTaskInfo, |
code => \&getTaskInfo, |
| 75 |
signature => [ 'struct string' ], |
signature => [ 'struct string' ], |
| 76 |
help => "", |
help => "", |
| 77 |
|
protected => 1, |
| 78 |
}, |
}, |
| 79 |
{ |
{ |
| 80 |
name => "runTask", |
name => "runTask", |
| 83 |
code => \&runTask, |
code => \&runTask, |
| 84 |
signature => [ 'string string' ], |
signature => [ 'string string' ], |
| 85 |
help => "", |
help => "", |
| 86 |
|
protected => 1, |
| 87 |
|
}, |
| 88 |
|
{ |
| 89 |
|
name => "getTaskGroups", |
| 90 |
|
version => "0.02", |
| 91 |
|
hidden => 0, |
| 92 |
|
code => \&getTaskGroups, |
| 93 |
|
signature => [ 'struct', 'struct struct' ], |
| 94 |
|
help => "", |
| 95 |
|
protected => 0, |
| 96 |
}, |
}, |
| 97 |
]; |
]; |
| 98 |
$self->register($procs); |
$self->register($procs); |
| 240 |
} |
} |
| 241 |
|
|
| 242 |
|
|
| 243 |
|
sub getTaskGroups { |
| 244 |
|
my $self = shift; |
| 245 |
|
|
| 246 |
|
$logger->info( __PACKAGE__ . "->getTaskGroups()" ); |
| 247 |
|
|
| 248 |
|
# emulate a row based result |
| 249 |
|
my $jobgroups = $bizProcess->{app}->{config}->{jobs}->{groups}; |
| 250 |
|
|
| 251 |
|
return $jobgroups; |
| 252 |
|
|
| 253 |
|
} |
| 254 |
|
|
| 255 |
|
|
| 256 |
1; |
1; |