line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Qudo::Job; |
2
|
30
|
|
|
30
|
|
273
|
use strict; |
|
30
|
|
|
|
|
40
|
|
|
30
|
|
|
|
|
746
|
|
3
|
30
|
|
|
30
|
|
107
|
use warnings; |
|
30
|
|
|
|
|
31
|
|
|
30
|
|
|
|
|
12252
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
0
|
|
|
0
|
0
|
|
my ($class, %args) = @_; |
7
|
0
|
|
|
|
|
|
bless {%args}, $class; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
0
|
0
|
|
sub id { $_[0]->{job_data}->{job_id} } |
11
|
0
|
|
|
0
|
0
|
|
sub uniqkey { $_[0]->{job_data}->{job_uniqkey} } |
12
|
0
|
|
|
0
|
0
|
|
sub func_id { $_[0]->{job_data}->{func_id} } |
13
|
0
|
|
|
0
|
0
|
|
sub funcname { $_[0]->{job_data}->{func_name} } |
14
|
0
|
|
|
0
|
0
|
|
sub retry_cnt { $_[0]->{job_data}->{job_retry_cnt} } |
15
|
0
|
|
|
0
|
0
|
|
sub grabbed_until { $_[0]->{job_data}->{job_grabbed_until} } |
16
|
0
|
|
|
0
|
0
|
|
sub priority { $_[0]->{job_data}->{job_priority} } |
17
|
0
|
|
|
0
|
0
|
|
sub arg : lvalue { $_[0]->{job_data}->{job_arg} } |
18
|
0
|
|
|
0
|
0
|
|
sub arg_origin : lvalue { $_[0]->{arg_origin} } |
19
|
0
|
|
|
0
|
0
|
|
sub db { $_[0]->{db} } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
0
|
|
sub manager { $_[0]->{manager} } |
22
|
0
|
|
|
0
|
0
|
|
sub job_start_time : lvalue { $_[0]->{job_start_time} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub completed { |
25
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
26
|
0
|
|
|
|
|
|
$self->{_complete} = 1; |
27
|
0
|
0
|
|
|
|
|
return unless $self->funcname->set_job_status; |
28
|
0
|
|
|
|
|
|
$self->manager->set_job_status($self, 'completed'); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
0
|
|
sub is_completed { $_[0]->{_complete} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub reenqueue { |
34
|
0
|
|
|
0
|
0
|
|
my ($self, $args) = @_; |
35
|
0
|
|
|
|
|
|
$self->manager->reenqueue($self, $args); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|