line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Qless::Jobs; |
2
|
|
|
|
|
|
|
=head1 NAME |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Qless::Jobs |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=cut |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
9
|
1
|
|
|
1
|
|
4
|
use Time::HiRes qw(); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
307
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
12
|
0
|
|
|
|
|
|
my ($name, $client) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
0
|
|
|
|
|
$class = ref $class if ref $class; |
15
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
$self->{'name'} = $name; |
18
|
0
|
|
|
|
|
|
$self->{'client'} = $client; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub running { |
24
|
0
|
|
|
0
|
0
|
|
my ($self, $offset, $count) = @_; |
25
|
0
|
|
0
|
|
|
|
return $self->{'client'}->_jobs([], 'running', Time::HiRes::time, $self->{'name'}, $offset||0, $count||25); |
|
|
|
0
|
|
|
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub stalled { |
29
|
0
|
|
|
0
|
0
|
|
my ($self, $offset, $count) = @_; |
30
|
0
|
|
0
|
|
|
|
return $self->{'client'}->_jobs([], 'stalled', Time::HiRes::time, $self->{'name'}, $offset||0, $count||25); |
|
|
|
0
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub scheduled { |
34
|
0
|
|
|
0
|
0
|
|
my ($self, $offset, $count) = @_; |
35
|
0
|
|
0
|
|
|
|
return $self->{'client'}->_jobs([], 'scheduled', Time::HiRes::time, $self->{'name'}, $offset||0, $count||25); |
|
|
|
0
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub depends { |
39
|
0
|
|
|
0
|
0
|
|
my ($self, $offset, $count) = @_; |
40
|
0
|
|
0
|
|
|
|
return $self->{'client'}->_jobs([], 'depends', Time::HiRes::time, $self->{'name'}, $offset||0, $count||25); |
|
|
|
0
|
|
|
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub recurring { |
44
|
0
|
|
|
0
|
0
|
|
my ($self, $offset, $count) = @_; |
45
|
0
|
|
0
|
|
|
|
return $self->{'client'}->_jobs([], 'recurring', Time::HiRes::time, $self->{'name'}, $offset||0, $count||25); |
|
|
|
0
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |