Hello community, here is the log from the commit of package perl-Minion for openSUSE:Factory checked in at 2020-06-19 17:24:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Minion (Old) and /work/SRC/openSUSE:Factory/.perl-Minion.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Minion" Fri Jun 19 17:24:28 2020 rev:57 rq:815871 version:10.08 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Minion/perl-Minion.changes 2020-06-17 14:57:34.686468718 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Minion.new.3606/perl-Minion.changes 2020-06-19 17:25:14.360215387 +0200 @@ -1,0 +2,9 @@ +Thu Jun 18 03:09:47 UTC 2020 - Tina Müller <timueller+p...@suse.de> + +- updated to 10.08 + see /usr/share/doc/packages/perl-Minion/Changes + + 10.08 2020-06-17 + - Improved Minion::Job to record exit code and the signal a job died from, if it was terminated unexpectedly. + +------------------------------------------------------------------- Old: ---- Minion-10.07.tar.gz New: ---- Minion-10.08.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Minion.spec ++++++ --- /var/tmp/diff_new_pack.jaU84o/_old 2020-06-19 17:25:15.768219507 +0200 +++ /var/tmp/diff_new_pack.jaU84o/_new 2020-06-19 17:25:15.772219518 +0200 @@ -17,7 +17,7 @@ Name: perl-Minion -Version: 10.07 +Version: 10.08 Release: 0 %define cpan_name Minion Summary: Job queue ++++++ Minion-10.07.tar.gz -> Minion-10.08.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/Changes new/Minion-10.08/Changes --- old/Minion-10.07/Changes 2020-06-16 18:11:26.000000000 +0200 +++ new/Minion-10.08/Changes 2020-06-17 19:26:58.000000000 +0200 @@ -1,4 +1,7 @@ +10.08 2020-06-17 + - Improved Minion::Job to record exit code and the signal a job died from, if it was terminated unexpectedly. + 10.07 2020-06-16 - Removed experimental status from Minion::Iterator module. - Removed experimental status from jobs and workers methods in Minion. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/META.json new/Minion-10.08/META.json --- old/Minion-10.07/META.json 2020-06-16 18:15:18.000000000 +0200 +++ new/Minion-10.08/META.json 2020-06-17 19:57:26.000000000 +0200 @@ -57,6 +57,6 @@ "web" : "https://webchat.freenode.net/#mojo" } }, - "version" : "10.07", + "version" : "10.08", "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/META.yml new/Minion-10.08/META.yml --- old/Minion-10.07/META.yml 2020-06-16 18:15:18.000000000 +0200 +++ new/Minion-10.08/META.yml 2020-06-17 19:57:26.000000000 +0200 @@ -29,5 +29,5 @@ homepage: https://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/mojolicious/minion.git -version: '10.07' +version: '10.08' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/lib/Minion/Job.pm new/Minion-10.08/lib/Minion/Job.pm --- old/Minion-10.07/lib/Minion/Job.pm 2020-06-16 17:12:13.000000000 +0200 +++ new/Minion-10.08/lib/Minion/Job.pm 2020-06-17 19:42:01.000000000 +0200 @@ -35,7 +35,7 @@ sub is_finished { my $self = shift; return undef unless waitpid($self->{pid}, WNOHANG) == $self->{pid}; - $self->_reap; + $self->_reap($? ? (1, $? >> 8, $? & 127) : ()); return 1; } @@ -49,7 +49,7 @@ sub perform { my $self = shift; waitpid $self->start->pid, 0; - $self->_reap; + $self->_reap($? ? (1, $? >> 8, $? & 127) : ()); } sub pid { shift->{pid} } @@ -84,9 +84,9 @@ sub stop { shift->kill('KILL') } sub _reap { - my $self = shift; + my ($self, $term, $exit, $sig) = @_; $self->emit(reap => $self->{pid}); - $? ? $self->fail("Non-zero exit status (@{[$? >> 8]})") : $self->finish; + $term ? $self->fail("Job terminated unexpectedly (exit code: $exit, signal: $sig)") : $self->finish; } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/lib/Minion.pm new/Minion-10.08/lib/Minion.pm --- old/Minion-10.07/lib/Minion.pm 2020-06-16 18:08:55.000000000 +0200 +++ new/Minion-10.08/lib/Minion.pm 2020-06-16 18:15:56.000000000 +0200 @@ -20,7 +20,7 @@ has remove_after => 172800; has tasks => sub { {} }; -our $VERSION = '10.07'; +our $VERSION = '10.08'; sub add_task { my ($self, $name, $task) = @_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/t/pg.t new/Minion-10.08/t/pg.t --- old/Minion-10.07/t/pg.t 2020-06-10 22:05:31.000000000 +0200 +++ new/Minion-10.08/t/pg.t 2020-06-17 19:24:17.000000000 +0200 @@ -853,15 +853,15 @@ is_deeply $minion->job($id)->info->{result}, {added => 17}, 'right result'; }; -subtest 'Non-zero exit status' => sub { +subtest 'Job terminated unexpectedly' => sub { $minion->add_task(exit => sub { exit 1 }); my $id = $minion->enqueue('exit'); my $worker = $minion->worker->register; my $job = $worker->register->dequeue(0); is $job->id, $id, 'right id'; $job->perform; - is $job->info->{state}, 'failed', 'right state'; - is $job->info->{result}, 'Non-zero exit status (1)', 'right result'; + is $job->info->{state}, 'failed', 'right state'; + is $job->info->{result}, 'Job terminated unexpectedly (exit code: 1, signal: 0)', 'right result'; $worker->unregister; }; @@ -880,9 +880,9 @@ is $job->retries, 0, 'job has not been retried'; $job->perform; my $info = $job->info; - is $info->{attempts}, 2, 'job will be attempted twice'; - is $info->{state}, 'inactive', 'right state'; - is $info->{result}, 'Non-zero exit status (1)', 'right result'; + is $info->{attempts}, 2, 'job will be attempted twice'; + is $info->{state}, 'inactive', 'right state'; + is $info->{result}, 'Job terminated unexpectedly (exit code: 1, signal: 0)', 'right result'; ok $info->{retried} < $job->info->{delayed}, 'delayed timestamp'; $minion->backend->pg->db->query('update minion_jobs set delayed = now() where id = ?', $id); $job = $worker->register->dequeue(0); @@ -890,17 +890,17 @@ is $job->retries, 1, 'job has been retried once'; $job->perform; $info = $job->info; - is $info->{attempts}, 2, 'job will be attempted twice'; - is $info->{state}, 'failed', 'right state'; - is $info->{result}, 'Non-zero exit status (1)', 'right result'; + is $info->{attempts}, 2, 'job will be attempted twice'; + is $info->{state}, 'failed', 'right state'; + is $info->{result}, 'Job terminated unexpectedly (exit code: 1, signal: 0)', 'right result'; ok $job->retry({attempts => 3}), 'job retried'; $job = $worker->register->dequeue(0); is $job->id, $id, 'right id'; $job->perform; $info = $job->info; - is $info->{attempts}, 3, 'job will be attempted three times'; - is $info->{state}, 'failed', 'right state'; - is $info->{result}, 'Non-zero exit status (1)', 'right result'; + is $info->{attempts}, 3, 'job will be attempted three times'; + is $info->{state}, 'failed', 'right state'; + is $info->{result}, 'Job terminated unexpectedly (exit code: 1, signal: 0)', 'right result'; $worker->unregister; }; @@ -972,10 +972,10 @@ is_deeply $minion->job($id)->info->{result}, {added => 21}, 'right result'; is $minion->job($id2)->info->{state}, 'finished', 'right state'; is_deeply $minion->job($id2)->info->{result}, {added => 25}, 'right result'; - is $minion->job($id3)->info->{state}, 'finished', 'right state'; - is $minion->job($id3)->info->{result}, undef, 'no result'; - is $minion->job($id4)->info->{state}, 'failed', 'right state'; - is $minion->job($id4)->info->{result}, 'Non-zero exit status (1)', 'right result'; + is $minion->job($id3)->info->{state}, 'finished', 'right state'; + is $minion->job($id3)->info->{result}, undef, 'no result'; + is $minion->job($id4)->info->{state}, 'failed', 'right state'; + is $minion->job($id4)->info->{result}, 'Job terminated unexpectedly (exit code: 1, signal: 0)', 'right result'; $worker->unregister; }; @@ -993,8 +993,8 @@ ok !$job->is_finished, 'job is not finished'; $job->stop; usleep 5000 until $job->is_finished; - is $job->info->{state}, 'failed', 'right state'; - like $job->info->{result}, qr/Non-zero exit status/, 'right result'; + is $job->info->{state}, 'failed', 'right state'; + like $job->info->{result}, qr/Job terminated unexpectedly/, 'right result'; $minion->enqueue('long_running'); $job = $worker->dequeue(0); ok $job->start->pid, 'has a process id'; @@ -1005,8 +1005,8 @@ is $job->info->{state}, 'active', 'right state'; $job->kill('INT'); usleep 5000 until $job->is_finished; - is $job->info->{state}, 'failed', 'right state'; - like $job->info->{result}, qr/Non-zero exit status/, 'right result'; + is $job->info->{state}, 'failed', 'right state'; + like $job->info->{result}, qr/Job terminated unexpectedly/, 'right result'; $worker->unregister; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-10.07/t/pg_worker.t new/Minion-10.08/t/pg_worker.t --- old/Minion-10.07/t/pg_worker.t 2020-06-02 16:59:39.000000000 +0200 +++ new/Minion-10.08/t/pg_worker.t 2020-06-17 19:46:53.000000000 +0200 @@ -43,13 +43,13 @@ int => sub { my $job = shift; my $forever = 1; - my $message = 'signals:'; + my %received; local $SIG{INT} = sub { $forever = 0 }; - local $SIG{USR1} = sub { $message .= ' usr1' }; - local $SIG{USR2} = sub { $message .= ' usr2' }; + local $SIG{USR1} = sub { $received{usr1}++ }; + local $SIG{USR2} = sub { $received{usr2}++ }; $job->minion->broadcast('kill', [$_, $job->id]) for qw(USR1 USR2 INT); while ($forever) { sleep 1 } - $job->finish({msg => $message}); + $job->finish({msg => 'signals: ' . join(' ', sort keys %received)}); } ); my $worker = $minion->worker;