Hello community,

here is the log from the commit of package perl-Minion for openSUSE:Factory 
checked in at 2020-06-17 14:57:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Minion (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Minion.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Minion"

Wed Jun 17 14:57:07 2020 rev:56 rq:815420 version:10.07

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Minion/perl-Minion.changes  2020-06-03 
20:33:33.769368266 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Minion.new.3606/perl-Minion.changes        
2020-06-17 14:57:34.686468718 +0200
@@ -1,0 +2,15 @@
+Wed Jun 17 03:12:09 UTC 2020 - Tina Müller <timueller+p...@suse.de>
+
+- updated to 10.07
+   see /usr/share/doc/packages/perl-Minion/Changes
+
+  10.07  2020-06-16
+    - Removed experimental status from Minion::Iterator module.
+    - Removed experimental status from jobs and workers methods in Minion.
+    - Removed experimental status from before options of list_jobs and 
list_workers methods in Minion::Backend and
+      Minion::Backend::Pg.
+    - Updated project metadata.
+    - Improved admin ui to allow sending TERM signals.
+    - Fixed a bug in Minion::Job where CHLD, INT, TERM and QUIT signals would 
be ignored by job processes.
+
+-------------------------------------------------------------------

Old:
----
  Minion-10.06.tar.gz

New:
----
  Minion-10.07.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Minion.spec ++++++
--- /var/tmp/diff_new_pack.y0iNpG/_old  2020-06-17 14:57:35.702472197 +0200
+++ /var/tmp/diff_new_pack.y0iNpG/_new  2020-06-17 14:57:35.702472197 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Minion
-Version:        10.06
+Version:        10.07
 Release:        0
 %define cpan_name Minion
 Summary:        Job queue

++++++ Minion-10.06.tar.gz -> Minion-10.07.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/Changes new/Minion-10.07/Changes
--- old/Minion-10.06/Changes    2020-06-02 20:21:53.000000000 +0200
+++ new/Minion-10.07/Changes    2020-06-16 18:11:26.000000000 +0200
@@ -1,4 +1,13 @@
 
+10.07  2020-06-16
+  - Removed experimental status from Minion::Iterator module.
+  - Removed experimental status from jobs and workers methods in Minion.
+  - Removed experimental status from before options of list_jobs and 
list_workers methods in Minion::Backend and
+    Minion::Backend::Pg.
+  - Updated project metadata.
+  - Improved admin ui to allow sending TERM signals.
+  - Fixed a bug in Minion::Job where CHLD, INT, TERM and QUIT signals would be 
ignored by job processes.
+
 10.06  2020-06-01
   - Added EXPERIMENTAL support for custom task classes.
   - Added EXPERIMENTAL class_for_task method to Minion.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/META.json new/Minion-10.07/META.json
--- old/Minion-10.06/META.json  2020-06-03 00:49:27.000000000 +0200
+++ new/Minion-10.07/META.json  2020-06-16 18:15:18.000000000 +0200
@@ -52,8 +52,11 @@
          "url" : "https://github.com/mojolicious/minion.git";,
          "web" : "https://github.com/mojolicious/minion";
       },
-      "x_IRC" : "irc://irc.freenode.net/#mojo"
+      "x_IRC" : {
+         "url" : "irc://irc.freenode.net/#mojo",
+         "web" : "https://webchat.freenode.net/#mojo";
+      }
    },
-   "version" : "10.06",
+   "version" : "10.07",
    "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/META.yml new/Minion-10.07/META.yml
--- old/Minion-10.06/META.yml   2020-06-03 00:49:27.000000000 +0200
+++ new/Minion-10.07/META.yml   2020-06-16 18:15:18.000000000 +0200
@@ -22,10 +22,12 @@
   Mojolicious: '8.50'
   perl: '5.016'
 resources:
-  IRC: irc://irc.freenode.net/#mojo
+  IRC:
+    url: irc://irc.freenode.net/#mojo
+    web: https://webchat.freenode.net/#mojo
   bugtracker: https://github.com/mojolicious/minion/issues
   homepage: https://mojolicious.org
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/mojolicious/minion.git
-version: '10.06'
+version: '10.07'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/Makefile.PL new/Minion-10.07/Makefile.PL
--- old/Minion-10.06/Makefile.PL        2020-05-31 14:18:09.000000000 +0200
+++ new/Minion-10.07/Makefile.PL        2020-06-03 16:08:25.000000000 +0200
@@ -25,7 +25,7 @@
         url  => 'https://github.com/mojolicious/minion.git',
         web  => 'https://github.com/mojolicious/minion',
       },
-      x_IRC => 'irc://irc.freenode.net/#mojo'
+      x_IRC => {url => 'irc://irc.freenode.net/#mojo', web => 
'https://webchat.freenode.net/#mojo'}
     },
   },
   PREREQ_PM => {Mojolicious => '8.50'},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion/Backend/Pg.pm 
new/Minion-10.07/lib/Minion/Backend/Pg.pm
--- old/Minion-10.06/lib/Minion/Backend/Pg.pm   2020-06-02 17:55:05.000000000 
+0200
+++ new/Minion-10.07/lib/Minion/Backend/Pg.pm   2020-06-16 18:12:37.000000000 
+0200
@@ -501,7 +501,7 @@
 
   before => 23
 
-List only jobs before this id. Note that this option is B<EXPERIMENTAL> and 
might change without warning!
+List only jobs before this id.
 
 =item ids
 
@@ -721,7 +721,7 @@
 
   before => 23
 
-List only workers before this id. Note that this option is B<EXPERIMENTAL> and 
might change without warning!
+List only workers before this id.
 
 =item ids
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion/Backend.pm 
new/Minion-10.07/lib/Minion/Backend.pm
--- old/Minion-10.06/lib/Minion/Backend.pm      2020-06-02 17:54:33.000000000 
+0200
+++ new/Minion-10.07/lib/Minion/Backend.pm      2020-06-16 18:10:33.000000000 
+0200
@@ -258,7 +258,7 @@
 
   before => 23
 
-List only jobs before this id. Note that this option is B<EXPERIMENTAL> and 
might change without warning!
+List only jobs before this id.
 
 =item ids
 
@@ -478,7 +478,7 @@
 
   before => 23
 
-List only workers before this id. Note that this option is B<EXPERIMENTAL> and 
might change without warning!
+List only workers before this id.
 
 =item ids
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion/Command/minion/worker.pm 
new/Minion-10.07/lib/Minion/Command/minion/worker.pm
--- old/Minion-10.06/lib/Minion/Command/minion/worker.pm        2020-05-30 
23:53:08.000000000 +0200
+++ new/Minion-10.07/lib/Minion/Command/minion/worker.pm        2020-06-16 
17:21:18.000000000 +0200
@@ -93,7 +93,7 @@
 The job processes spawned by the L<Minion::Command::minion::worker> process 
can be controlled at runtime with the
 following signals.
 
-=head2 INT
+=head2 INT, TERM
 
 This signal starts out with the operating system default and allows for jobs 
to install a custom signal handler to stop
 gracefully.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion/Iterator.pm 
new/Minion-10.07/lib/Minion/Iterator.pm
--- old/Minion-10.06/lib/Minion/Iterator.pm     2020-06-02 20:30:43.000000000 
+0200
+++ new/Minion-10.07/lib/Minion/Iterator.pm     2020-06-16 18:14:20.000000000 
+0200
@@ -2,7 +2,7 @@
 use Mojo::Base -base;
 
 has fetch => 10;
-has [qw(minion options what)];
+has [qw(minion options)];
 
 sub next { shift @{shift->_fetch(0)->{results}} }
 
@@ -42,8 +42,7 @@
 
 =head1 DESCRIPTION
 
-L<Minion::Iterator> is an iterator for L<Minion> listing methods. Note that 
this module is B<EXPERIMENTAL> and might
-change without warning!
+L<Minion::Iterator> is an iterator for L<Minion> listing methods.
 
 =head1 ATTRIBUTES
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion/Job.pm 
new/Minion-10.07/lib/Minion/Job.pm
--- old/Minion-10.06/lib/Minion/Job.pm  2020-06-02 18:31:31.000000000 +0200
+++ new/Minion-10.07/lib/Minion/Job.pm  2020-06-16 17:12:13.000000000 +0200
@@ -72,8 +72,8 @@
 
   # Reset event loop
   Mojo::IOLoop->reset;
-  local @{$SIG}{qw(CHLD INT TERM QUIT)} = ('default') x 4;
-  local @{$SIG}{qw(USR1 USR2)}          = ('ignore') x 2;
+  local $SIG{CHLD} = local $SIG{INT}  = local $SIG{TERM} = local $SIG{QUIT} = 
'DEFAULT';
+  local $SIG{USR1} = local $SIG{USR2} = 'IGNORE';
 
   # Child
   if (defined(my $err = $self->execute)) { $self->fail($err) }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion/Worker.pm 
new/Minion-10.07/lib/Minion/Worker.pm
--- old/Minion-10.06/lib/Minion/Worker.pm       2020-06-02 17:10:48.000000000 
+0200
+++ new/Minion-10.07/lib/Minion/Worker.pm       2020-06-16 17:21:07.000000000 
+0200
@@ -87,7 +87,7 @@
 
 sub _kill {
   my ($self, $signal, $id) = (shift, shift // '', shift // '');
-  return unless grep         { $signal eq $_ } qw(INT KILL USR1 USR2);
+  return unless grep         { $signal eq $_ } qw(INT TERM KILL USR1 USR2);
   $_->kill($signal) for grep { $_->id eq $id } @{$self->{jobs}};
 }
 
@@ -159,7 +159,7 @@
 
 The job processes spawned by the L<Minion::Worker> process can be controlled 
at runtime with the following signals.
 
-=head2 INT
+=head2 INT, TERM
 
 This signal starts out with the operating system default and allows for jobs 
to install a custom signal handler to stop
 gracefully.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Minion.pm 
new/Minion-10.07/lib/Minion.pm
--- old/Minion-10.06/lib/Minion.pm      2020-06-02 20:31:54.000000000 +0200
+++ new/Minion-10.07/lib/Minion.pm      2020-06-16 18:08:55.000000000 +0200
@@ -20,7 +20,7 @@
 has remove_after  => 172800;
 has tasks         => sub { {} };
 
-our $VERSION = '10.06';
+our $VERSION = '10.07';
 
 sub add_task {
   my ($self, $name, $task) = @_;
@@ -58,7 +58,7 @@
 
   # Reset event loop
   Mojo::IOLoop->reset;
-  local @{$SIG}{qw(CHLD INT TERM QUIT)} = ('default') x 4;
+  local $SIG{CHLD} = local $SIG{INT} = local $SIG{TERM} = local $SIG{QUIT} = 
'DEFAULT';
 
   my $worker = $self->worker->register;
   $job = $worker->dequeue(0 => {id => $id, queues => ['minion_foreground']});
@@ -324,6 +324,28 @@
   # Mojolicious::Lite
   plugin 'MyApp::Task::PokeMojo';
 
+=head1 TASK CLASSES
+
+For even more flexibility you can also move tasks into dedicated classes. 
Allowing the use of Perl features such as
+inheritance and roles. But be aware that support for task classes is still 
B<EXPERIMENTAL> and might change without
+warning!
+
+  package MyApp::Task::PokeMojo;
+  use Mojo::Base 'Minion::Job';
+
+  sub run {
+    my $self = shift;
+    $self->app->ua->get('mojolicious.org');
+    $self->app->log->debug('We have poked mojolicious.org for a visitor');
+  }
+
+  1;
+
+Task classes are registered just like any other task with L</"add_task"> and 
you can even register the same class with
+multiple names.
+
+  $minion->add_task(poke_mojo => 'MyApp::Task::PokeMojo');
+
 =head1 EXAMPLES
 
 This distribution also contains a great example application you can use for 
inspiration. The L<link
@@ -585,8 +607,7 @@
   my $jobs = $minion->jobs;
   my $jobs = $minion->jobs({states => ['inactive']});
 
-Return L<Minion::Iterator> object to safely iterate through job information. 
Note that this method is B<EXPERIMENTAL>
-and might change without warning!
+Return L<Minion::Iterator> object to safely iterate through job information.
 
   # Iterate through jobs for two tasks
   my $jobs = $minion->jobs({tasks => ['foo', 'bar']});
@@ -945,8 +966,7 @@
 
   enqueued_jobs => 100000
 
-Rough estimate of how many jobs have ever been enqueued. Note that this field 
is B<EXPERIMENTAL> and might change
-without warning!
+Rough estimate of how many jobs have ever been enqueued.
 
 =item failed_jobs
 
@@ -1031,8 +1051,7 @@
   my $workers = $minion->workers;
   my $workers = $minion->workers({ids => [2, 3]});
 
-Return L<Minion::Iterator> object to safely iterate through worker 
information. Note that this method is B<EXPERIMENTAL>
-and might change without warning!
+Return L<Minion::Iterator> object to safely iterate through worker information.
 
   # Iterate through workers
   my $workers = $minion->workers;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/lib/Mojolicious/Plugin/Minion/Admin.pm 
new/Minion-10.07/lib/Mojolicious/Plugin/Minion/Admin.pm
--- old/Minion-10.06/lib/Mojolicious/Plugin/Minion/Admin.pm     2020-05-30 
23:53:08.000000000 +0200
+++ new/Minion-10.07/lib/Mojolicious/Plugin/Minion/Admin.pm     2020-06-16 
17:18:18.000000000 +0200
@@ -105,7 +105,7 @@
 
   my $v = $c->validation;
   $v->required('id');
-  $v->required('do')->in('remove', 'retry', 'sig_int', 'sig_usr1', 'sig_usr2', 
'stop');
+  $v->required('do')->in('remove', 'retry', 'sig_int', 'sig_term', 'sig_usr1', 
'sig_usr2', 'stop');
 
   $c->redirect_to('minion_jobs') if $v->has_error;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Minion-10.06/lib/Mojolicious/Plugin/Minion/resources/templates/minion/jobs.html.ep
 
new/Minion-10.07/lib/Mojolicious/Plugin/Minion/resources/templates/minion/jobs.html.ep
--- 
old/Minion-10.06/lib/Mojolicious/Plugin/Minion/resources/templates/minion/jobs.html.ep
      2020-05-13 21:52:49.000000000 +0200
+++ 
new/Minion-10.07/lib/Mojolicious/Plugin/Minion/resources/templates/minion/jobs.html.ep
      2020-06-16 17:18:57.000000000 +0200
@@ -57,6 +57,9 @@
           <button class="dropdown-item" name="do" value="sig_int" 
type="submit">
             INT
           </button>
+          <button class="dropdown-item" name="do" value="sig_term" 
type="submit">
+            TERM
+          </button>
           <button class="dropdown-item" name="do" value="sig_usr1"
             type="submit">
             USR1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-10.06/t/pg.t new/Minion-10.07/t/pg.t
--- old/Minion-10.06/t/pg.t     2020-06-02 18:10:20.000000000 +0200
+++ new/Minion-10.07/t/pg.t     2020-06-10 22:05:31.000000000 +0200
@@ -1060,6 +1060,7 @@
 
 subtest 'Custom task classes' => sub {
   $minion->add_task(my_add       => 'MinionTest::AddTestTask');
+  $minion->add_task(my_other_add => 'MinionTest::AddTestTask');
   $minion->add_task(my_empty     => 'MinionTest::EmptyTestTask');
   $minion->add_task(my_no_result => 'MinionTest::NoResultTestTask');
   $minion->add_task(my_fail      => 'MinionTest::FailTestTask');
@@ -1084,6 +1085,14 @@
   is $job->info->{state},  'finished',       'right state';
   is $job->info->{result}, 'My result is 8', 'right result';
 
+  $minion->enqueue(my_other_add => [5, 4]);
+  $job = $worker->dequeue(0);
+  isa_ok $job, 'MinionTest::AddTestTask', 'right class';
+  is $job->task, 'my_other_add', 'right task';
+  $job->perform;
+  is $job->info->{state},  'finished',       'right state';
+  is $job->info->{result}, 'My result is 9', 'right result';
+
   my $id = $minion->enqueue('my_no_result');
   $minion->perform_jobs;
   $job = $minion->job($id);


Reply via email to