Hello community,

here is the log from the commit of package perl-Minion for openSUSE:Factory 
checked in at 2017-07-11 08:27:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Minion (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Minion.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Minion"

Tue Jul 11 08:27:08 2017 rev:27 rq:509086 version:7.03

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Minion/perl-Minion.changes  2017-06-29 
15:14:37.925152593 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Minion.new/perl-Minion.changes     
2017-07-11 08:27:12.587900575 +0200
@@ -1,0 +2,15 @@
+Sat Jul  8 05:51:00 UTC 2017 - [email protected]
+
+- updated to 7.03
+   see /usr/share/doc/packages/perl-Minion/Changes
+
+  7.03  2017-07-06
+    - Updated Mojo::Pg requirement to 4.0.
+    - Improved Minion::Backend::Pg to support sharing the database connection
+      cache with existing Mojo::Pg objects.
+  
+  7.02  2017-07-05
+    - Improved performance of worker command when processing jobs that are
+      finished very quickly.
+
+-------------------------------------------------------------------

Old:
----
  Minion-7.01.tar.gz

New:
----
  Minion-7.03.tar.gz

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

Other differences:
------------------
++++++ perl-Minion.spec ++++++
--- /var/tmp/diff_new_pack.9qcmjU/_old  2017-07-11 08:27:13.179817084 +0200
+++ /var/tmp/diff_new_pack.9qcmjU/_new  2017-07-11 08:27:13.183816519 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Minion
-Version:        7.01
+Version:        7.03
 Release:        0
 %define cpan_name Minion
 Summary:        Job queue

++++++ Minion-7.01.tar.gz -> Minion-7.03.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/Changes new/Minion-7.03/Changes
--- old/Minion-7.01/Changes     2017-06-25 17:50:48.000000000 +0200
+++ new/Minion-7.03/Changes     2017-07-06 23:55:07.000000000 +0200
@@ -1,4 +1,13 @@
 
+7.03  2017-07-06
+  - Updated Mojo::Pg requirement to 4.0.
+  - Improved Minion::Backend::Pg to support sharing the database connection
+    cache with existing Mojo::Pg objects.
+
+7.02  2017-07-05
+  - Improved performance of worker command when processing jobs that are
+    finished very quickly.
+
 7.01  2017-06-25
   - Added note methods to Minion::Job and Minion::Backend::Pg.
   - Added notes option to enqueue methods in Minion and Minion::Backend::Pg.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/META.json new/Minion-7.03/META.json
--- old/Minion-7.01/META.json   2017-06-25 20:57:36.000000000 +0200
+++ new/Minion-7.03/META.json   2017-07-06 23:56:48.000000000 +0200
@@ -54,6 +54,6 @@
       },
       "x_IRC" : "irc://irc.perl.org/#mojo"
    },
-   "version" : "7.01",
+   "version" : "7.03",
    "x_serialization_backend" : "JSON::PP version 2.94"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/META.yml new/Minion-7.03/META.yml
--- old/Minion-7.01/META.yml    2017-06-25 20:57:36.000000000 +0200
+++ new/Minion-7.03/META.yml    2017-07-06 23:56:48.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.01'
+version: '7.03'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/lib/Minion/Backend/Pg.pm 
new/Minion-7.03/lib/Minion/Backend/Pg.pm
--- old/Minion-7.01/lib/Minion/Backend/Pg.pm    2017-06-25 20:34:58.000000000 
+0200
+++ new/Minion-7.03/lib/Minion/Backend/Pg.pm    2017-07-06 23:53:19.000000000 
+0200
@@ -3,7 +3,7 @@
 
 use Carp 'croak';
 use Mojo::IOLoop;
-use Mojo::Pg 2.18;
+use Mojo::Pg 4.0;
 use Sys::Hostname 'hostname';
 
 has 'pg';
@@ -90,25 +90,27 @@
     $name, $duration, $options->{limit} || 1)->array->[0];
 }
 
-sub note {
-  my ($self, $id, $key, $value) = @_;
-  return !!$self->pg->db->query(
-    'update minion_jobs set notes = jsonb_set(notes, ?, ?, true) where id = ?',
-    [$key], {json => $value}, $id
-  )->rows;
-}
-
 sub new {
   my $self = shift->SUPER::new(pg => Mojo::Pg->new(@_));
 
+  my $db = Mojo::Pg->new(@_)->db;
   croak 'PostgreSQL 9.5 or later is required'
-    if Mojo::Pg->new(@_)->db->dbh->{pg_server_version} < 90500;
-  my $pg = $self->pg->auto_migrate(1)->max_connections(1);
-  $pg->migrations->name('minion')->from_data;
+    if $db->dbh->{pg_server_version} < 90500;
+  $db->disconnect;
+
+  $self->pg->auto_migrate(1)->migrations->name('minion')->from_data;
 
   return $self;
 }
 
+sub note {
+  my ($self, $id, $key, $value) = @_;
+  return !!$self->pg->db->query(
+    'update minion_jobs set notes = jsonb_set(notes, ?, ?, true) where id = ?',
+    [$key], {json => $value}, $id
+  )->rows;
+}
+
 sub receive {
   my $array = shift->pg->db->query(
     "update minion_workers as new set inbox = '[]'
@@ -617,18 +619,19 @@
 
 =back
 
-=head2 note
-
-  my $bool = $backend->note($job_id, foo => 'bar');
-
-Change a metadata field for a job.
-
 =head2 new
 
   my $backend = Minion::Backend::Pg->new('postgresql://postgres@/test');
+  my $backend = Minion::Backend::Pg->new(Mojo::Pg->new);
 
 Construct a new L<Minion::Backend::Pg> object.
 
+=head2 note
+
+  my $bool = $backend->note($job_id, foo => 'bar');
+
+Change a metadata field for a job.
+
 =head2 receive
 
   my $commands = $backend->receive($worker_id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/lib/Minion/Command/minion/worker.pm 
new/Minion-7.03/lib/Minion/Command/minion/worker.pm
--- old/Minion-7.01/lib/Minion/Command/minion/worker.pm 2017-06-24 
15:01:28.000000000 +0200
+++ new/Minion-7.03/lib/Minion/Command/minion/worker.pm 2017-07-06 
00:22:50.000000000 +0200
@@ -25,7 +25,7 @@
   $status->{repair_interval} -= int rand $status->{repair_interval} / 2;
   $self->{last_repair} = $fast ? steady_time : 0;
 
-  local $SIG{CHLD} = 'DEFAULT';
+  local $SIG{CHLD} = sub { };
   local $SIG{INT} = local $SIG{TERM} = sub { $self->{finished}++ };
   local $SIG{QUIT}
     = sub { ++$self->{finished} and kill 'KILL', keys %{$self->{jobs}} };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/lib/Minion.pm 
new/Minion-7.03/lib/Minion.pm
--- old/Minion-7.01/lib/Minion.pm       2017-06-25 20:08:23.000000000 +0200
+++ new/Minion-7.03/lib/Minion.pm       2017-07-06 20:08:57.000000000 +0200
@@ -16,7 +16,7 @@
 has remove_after  => 172800;
 has tasks         => sub { {} };
 
-our $VERSION = '7.01';
+our $VERSION = '7.03';
 
 sub add_task { ($_[0]->tasks->{$_[1]} = $_[2]) and return $_[0] }
 
@@ -460,6 +460,7 @@
 =head2 new
 
   my $minion = Minion->new(Pg => 'postgresql://postgres@/test');
+  my $minion = Minion->new(Pg => Mojo::Pg->new);
 
 Construct a new L<Minion> object.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/lib/Mojolicious/Plugin/Minion.pm 
new/Minion-7.03/lib/Mojolicious/Plugin/Minion.pm
--- old/Minion-7.01/lib/Mojolicious/Plugin/Minion.pm    2017-06-24 
15:01:28.000000000 +0200
+++ new/Minion-7.03/lib/Mojolicious/Plugin/Minion.pm    2017-07-06 
20:11:40.000000000 +0200
@@ -30,6 +30,10 @@
   # Mojolicious::Lite (choose a backend)
   plugin Minion => {Pg => 'postgresql://postgres@/test'};
 
+  # Share the database connection cache (PostgreSQL backend)
+  helper pg => sub { state $pg = Mojo::Pg->new('postgresql://postgres@/test') 
};
+  plugin Minion => {Pg => app->pg};
+
   # Add tasks to your application
   app->minion->add_task(slow_log => sub {
     my ($job, $msg) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Minion-7.01/t/pg_lite_app.t 
new/Minion-7.03/t/pg_lite_app.t
--- old/Minion-7.01/t/pg_lite_app.t     2017-06-24 15:01:28.000000000 +0200
+++ new/Minion-7.03/t/pg_lite_app.t     2017-07-06 20:04:28.000000000 +0200
@@ -19,8 +19,7 @@
 my $pg = Mojo::Pg->new($ENV{TEST_ONLINE});
 $pg->db->query('drop schema if exists minion_app_test cascade');
 $pg->db->query('create schema minion_app_test');
-plugin Minion => {Pg => $ENV{TEST_ONLINE}};
-app->minion->backend->pg->search_path(['minion_app_test']);
+plugin Minion => {Pg => $pg};
 
 app->minion->add_task(
   add => sub {


Reply via email to