line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Proc::JobQueue::Command; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# $Id: Command.pm 13848 2009-07-23 21:34:00Z david $ |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
4827
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
119
|
|
7
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
918
|
|
8
|
|
|
|
|
|
|
require Proc::JobQueue::Job; |
9
|
|
|
|
|
|
|
our @ISA = qw(Proc::JobQueue::Job); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
40
|
|
|
40
|
0
|
1126
|
my ($pkg, $cmdStr, %params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
40
|
|
|
|
|
355
|
return $pkg->SUPER::new( |
16
|
|
|
|
|
|
|
command => $cmdStr, |
17
|
|
|
|
|
|
|
desc => "run $cmdStr", |
18
|
|
|
|
|
|
|
%params, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub success |
23
|
|
|
|
|
|
|
{ |
24
|
40
|
|
|
40
|
0
|
318
|
my ($job) = @_; |
25
|
40
|
|
|
|
|
926
|
print "# Job terminated correctly $job->{command}\n"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub failed |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
1
|
|
my ($job) = @_; |
31
|
0
|
|
|
|
|
|
print "#ERROR: Job terminated incorrectly $job->{command}\n"; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |