Hello community, here is the log from the commit of package perl-Minion for openSUSE:Factory checked in at 2017-08-10 14:05:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Minion (Old) and /work/SRC/openSUSE:Factory/.perl-Minion.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Minion" Thu Aug 10 14:05:46 2017 rev:29 rq:515146 version:7.05 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Minion/perl-Minion.changes 2017-08-02 11:28:04.986899277 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Minion.new/perl-Minion.changes 2017-08-10 14:13:19.458137299 +0200 @@ -1,0 +2,9 @@ +Tue Aug 8 05:52:20 UTC 2017 - [email protected] + +- updated to 7.05 + see /usr/share/doc/packages/perl-Minion/Changes + + 7.05 2017-08-07 + - Improved foreground method in Minion to rethrow job exceptions. + +------------------------------------------------------------------- Old: ---- Minion-7.04.tar.gz New: ---- Minion-7.05.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Minion.spec ++++++ --- /var/tmp/diff_new_pack.9EqvS7/_old 2017-08-10 14:13:20.286020731 +0200 +++ /var/tmp/diff_new_pack.9EqvS7/_new 2017-08-10 14:13:20.306017916 +0200 @@ -17,7 +17,7 @@ Name: perl-Minion -Version: 7.04 +Version: 7.05 Release: 0 %define cpan_name Minion Summary: Job queue ++++++ Minion-7.04.tar.gz -> Minion-7.05.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-7.04/Changes new/Minion-7.05/Changes --- old/Minion-7.04/Changes 2017-08-01 11:50:57.000000000 +0200 +++ new/Minion-7.05/Changes 2017-08-07 17:44:43.000000000 +0200 @@ -1,4 +1,7 @@ +7.05 2017-08-07 + - Improved foreground method in Minion to rethrow job exceptions. + 7.04 2017-08-01 - Added foreground method to Minion. - Added id option to dequeue methods in Minion::Worker and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-7.04/META.json new/Minion-7.05/META.json --- old/Minion-7.04/META.json 2017-08-01 15:19:43.000000000 +0200 +++ new/Minion-7.05/META.json 2017-08-07 21:47:04.000000000 +0200 @@ -54,6 +54,6 @@ }, "x_IRC" : "irc://irc.perl.org/#mojo" }, - "version" : "7.04", + "version" : "7.05", "x_serialization_backend" : "JSON::PP version 2.94" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-7.04/META.yml new/Minion-7.05/META.yml --- old/Minion-7.04/META.yml 2017-08-01 15:19:43.000000000 +0200 +++ new/Minion-7.05/META.yml 2017-08-07 21:47:04.000000000 +0200 @@ -27,5 +27,5 @@ homepage: http://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/kraih/minion.git -version: '7.04' +version: '7.05' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-7.04/lib/Minion/Job.pm new/Minion-7.05/lib/Minion/Job.pm --- old/Minion-7.04/lib/Minion/Job.pm 2017-08-01 11:46:27.000000000 +0200 +++ new/Minion-7.05/lib/Minion/Job.pm 2017-08-07 17:37:20.000000000 +0200 @@ -64,7 +64,7 @@ sub _run { my $self = shift; - return 1 if eval { + return undef if eval { # Reset event loop Mojo::IOLoop->reset; @@ -72,8 +72,8 @@ 1; }; - $self->fail($@); - return undef; + $self->fail(my $err = $@); + return $err; } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-7.04/lib/Minion.pm new/Minion-7.05/lib/Minion.pm --- old/Minion-7.04/lib/Minion.pm 2017-08-01 15:18:17.000000000 +0200 +++ new/Minion-7.05/lib/Minion.pm 2017-08-07 17:46:30.000000000 +0200 @@ -16,7 +16,7 @@ has remove_after => 172800; has tasks => sub { {} }; -our $VERSION = '7.04'; +our $VERSION = '7.05'; sub add_task { ($_[0]->tasks->{$_[1]} = $_[2]) and return $_[0] } @@ -36,10 +36,11 @@ my $worker = $self->worker->register; $job = $worker->dequeue(0 => {id => $id, queues => ['minion_foreground']}); - $job->_run and $job->finish if $job; + my $err; + if ($job) { $job->finish unless defined($err = $job->_run) } $worker->unregister; - return !!$job; + return defined $err ? die $err : !!$job; } sub job { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-7.04/t/pg.t new/Minion-7.05/t/pg.t --- old/Minion-7.04/t/pg.t 2017-08-01 11:56:53.000000000 +0200 +++ new/Minion-7.05/t/pg.t 2017-08-07 20:22:00.000000000 +0200 @@ -738,8 +738,11 @@ is $info->{state}, 'finished', 'right state'; is $info->{queue}, 'minion_foreground', 'right queue'; $id = $minion->enqueue('fail'); -$minion->foreground($id); +eval { $minion->foreground($id) }; +like $@, qr/Intentional failure!/, 'right error'; $info = $minion->job($id)->info; +ok $info->{worker}, 'has worker'; +ok !$minion->backend->worker_info($info->{worker}), 'not registered'; is $info->{retries}, 1, 'job has been retried'; is $info->{state}, 'failed', 'right state'; is $info->{queue}, 'minion_foreground', 'right queue';
