Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed bug. and Job#DESTROY removed.

  • Loading branch information...
commit c332b6b3b1376342a11fd783078b156e480835ce 1 parent bfd1cfa
@nekokak authored
Showing with 1 addition and 11 deletions.
  1. +1 −1  lib/Jonk.pm
  2. +0 −10 lib/Jonk/Job.pm
View
2  lib/Jonk.pm
@@ -121,7 +121,7 @@ sub _grab_job {
while (my $row = $sth->fetchrow_hashref) {
$job = $self->_grab_a_job($row, $time, $opt);
- last;
+ last if $job;
}
$sth->finish;
View
10 lib/Jonk/Job.pm
@@ -59,20 +59,10 @@ sub is_completed { $_[0]->{_completed} }
sub is_failed { $_[0]->{_failed} }
sub is_aborted { $_[0]->{_aborted} }
-sub DESTROY {
- my $self = shift;
- unless ($self->is_completed or $self->is_aborted or $self->is_failed) {
- Carp::cluck "job is not (complete|fail|abor)ed. this job auto failed.";
- $self->failed;
- }
-}
-
1;
__END__
-__END__
-
=head1 NAME
Jonk::Job - Jonk job class.
Please sign in to comment.
Something went wrong with that request. Please try again.