Hello community, here is the log from the commit of package perl-Minion for openSUSE:Factory checked in at 2019-08-30 14:42:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Minion (Old) and /work/SRC/openSUSE:Factory/.perl-Minion.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Minion" Fri Aug 30 14:42:54 2019 rev:50 rq:727179 version:9.13 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Minion/perl-Minion.changes 2019-08-09 16:55:06.169443983 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Minion.new.7948/perl-Minion.changes 2019-08-30 14:43:08.265410274 +0200 @@ -1,0 +2,9 @@ +Fri Aug 30 07:46:47 UTC 2019 - <timueller+p...@suse.de> + +- updated to 9.13 + see /usr/share/doc/packages/perl-Minion/Changes + + 9.13 2019-08-29 + - Added EXPERIMENTAL cleanup event to Minion::Job. + +------------------------------------------------------------------- Old: ---- Minion-9.12.tar.gz New: ---- Minion-9.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Minion.spec ++++++ --- /var/tmp/diff_new_pack.oS5hJh/_old 2019-08-30 14:43:09.261410171 +0200 +++ /var/tmp/diff_new_pack.oS5hJh/_new 2019-08-30 14:43:09.261410171 +0200 @@ -17,7 +17,7 @@ Name: perl-Minion -Version: 9.12 +Version: 9.13 Release: 0 %define cpan_name Minion Summary: Job queue ++++++ Minion-9.12.tar.gz -> Minion-9.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-9.12/Changes new/Minion-9.13/Changes --- old/Minion-9.12/Changes 2019-08-05 00:27:04.000000000 +0200 +++ new/Minion-9.13/Changes 2019-08-29 13:41:21.000000000 +0200 @@ -1,4 +1,7 @@ +9.13 2019-08-29 + - Added EXPERIMENTAL cleanup event to Minion::Job. + 9.12 2019-08-04 - Added EXPERIMENTAL notes option to list_jobs method in Minion::Backend and Minion::Backend::Pg. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-9.12/META.json new/Minion-9.13/META.json --- old/Minion-9.12/META.json 2019-08-05 11:49:53.000000000 +0200 +++ new/Minion-9.13/META.json 2019-08-29 13:42:04.000000000 +0200 @@ -54,6 +54,6 @@ }, "x_IRC" : "irc://irc.freenode.net/#mojo" }, - "version" : "9.12", + "version" : "9.13", "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-9.12/META.yml new/Minion-9.13/META.yml --- old/Minion-9.12/META.yml 2019-08-05 11:49:53.000000000 +0200 +++ new/Minion-9.13/META.yml 2019-08-29 13:42:04.000000000 +0200 @@ -27,5 +27,5 @@ homepage: https://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/mojolicious/minion.git -version: '9.12' +version: '9.13' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-9.12/lib/Minion/Job.pm new/Minion-9.13/lib/Minion/Job.pm --- old/Minion-9.12/lib/Minion/Job.pm 2019-08-05 00:26:21.000000000 +0200 +++ new/Minion-9.13/lib/Minion/Job.pm 2019-08-29 13:40:41.000000000 +0200 @@ -76,6 +76,7 @@ # Child if (defined(my $err = $self->execute)) { $self->fail($err) } + $self->emit('cleanup'); POSIX::_exit(0); } @@ -110,6 +111,21 @@ L<Minion::Job> inherits all events from L<Mojo::EventEmitter> and can emit the following new ones. +=head2 cleanup + + $job->on(cleanup => sub { + my $job = shift; + ... + }); + +Emitted in the process performing this job right before the process will exit. +Note that this event is EXPERIMENTAL and might change without warning! + + $job->on(cleanup => sub { + my $job = shift; + $job->app->log->debug("Process $$ is about to exit"); + }); + =head2 failed $job->on(failed => sub { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-9.12/lib/Minion.pm new/Minion-9.13/lib/Minion.pm --- old/Minion-9.12/lib/Minion.pm 2019-08-04 23:24:47.000000000 +0200 +++ new/Minion-9.13/lib/Minion.pm 2019-08-05 11:50:52.000000000 +0200 @@ -22,7 +22,7 @@ has remove_after => 172800; has tasks => sub { {} }; -our $VERSION = '9.12'; +our $VERSION = '9.13'; sub add_task { ($_[0]->tasks->{$_[1]} = $_[2]) and return $_[0] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-9.12/t/pg.t new/Minion-9.13/t/pg.t --- old/Minion-9.12/t/pg.t 2019-08-05 00:24:36.000000000 +0200 +++ new/Minion-9.13/t/pg.t 2019-08-29 13:40:02.000000000 +0200 @@ -602,7 +602,14 @@ finish => sub { my $job = shift; return unless defined(my $old = $job->info->{notes}{finish_count}); - $job->note(finish_count => $old + 1, pid => $$); + $job->note(finish_count => $old + 1, finish_pid => $$); + } + ); + $job->on( + cleanup => sub { + my $job = shift; + return unless defined(my $old = $job->info->{notes}{finish_count}); + $job->note(cleanup_count => $old + 1, cleanup_pid => $$); } ); } @@ -641,9 +648,12 @@ $job->perform; is_deeply $job->info->{result}, {added => 9}, 'right result'; is $job->info->{notes}{finish_count}, 1, 'finish event has been emitted once'; -ok $job->info->{notes}{pid}, 'has a process id'; -isnt $job->info->{notes}{pid}, $$, 'different process id'; -is $job->info->{notes}{before}, 23, 'value still exists'; +ok $job->info->{notes}{finish_pid}, 'has a process id'; +isnt $job->info->{notes}{finish_pid}, $$, 'different process id'; +is $job->info->{notes}{before}, 23, 'value still exists'; +is $job->info->{notes}{cleanup_count}, 2, 'cleanup event has been emitted once'; +ok $job->info->{notes}{cleanup_pid}, 'has a process id'; +isnt $job->info->{notes}{cleanup_pid}, $$, 'different process id'; $worker->unregister; # Queues