Lines 85-90
sub new {
Link Here
|
85 |
$self->{'jobID'} = Digest::MD5::md5_hex(Digest::MD5::md5_hex(time().{}.rand().{}.$$)); |
85 |
$self->{'jobID'} = Digest::MD5::md5_hex(Digest::MD5::md5_hex(time().{}.rand().{}.$$)); |
86 |
$self->{'extra_values'} = {}; |
86 |
$self->{'extra_values'} = {}; |
87 |
|
87 |
|
|
|
88 |
# Remove existing complete jobs |
89 |
# not to explode the size of the session |
90 |
my $prefix = "job_" . $self->{'jobID'}; |
91 |
my $session = get_session($self->{'sessionID'}); |
92 |
while ( my ( $param_name, $value ) = each %{$session->param_hashref} ) { |
93 |
if ( $param_name =~ m|^job_| and $param_name ne $prefix ) { |
94 |
my $old_job = $session->param($param_name); |
95 |
if ( $old_job->{status} eq 'completed' ) { |
96 |
$session->clear([ $param_name ]); |
97 |
} |
98 |
} |
99 |
} |
100 |
|
88 |
bless $self, $class; |
101 |
bless $self, $class; |
89 |
$self->_serialize(); |
102 |
$self->_serialize(); |
90 |
|
103 |
|
91 |
- |
|
|