Hello community,
here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2016-12-05 16:30:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old)
and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2016-11-11 14:31:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2016-12-05 16:30:01.000000000 +0100
@@ -1,0 +2,17 @@
+Thu Dec 1 06:51:27 UTC 2016 - coolo@suse.com
+
+- updated to 7.11
+ see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+ 7.11 2016-11-30
+ - Added EXPERIMENTAL close_idle_connections method to Mojo::Server::Daemon.
+ - Improved one_tick method in Mojo::IOLoop to protect from recursion, similar
+ to the start method.
+ - Improved log attribute in Mojolicious to make it easier to override default
+ settings. (jberger)
+ - Fixed bug in Mojo::Server::Prefork where workers would accept keep-alive
+ requests after a graceful shutdown had already been initiated.
+ - Fixed bugs in Mojo::Util and Mojo::Asset::File where incomplete writes would
+ not be recognized as errors. (bobkare, sri)
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-7.10.tar.gz
New:
----
Mojolicious-7.11.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.2OqUIO/_old 2016-12-05 16:30:03.000000000 +0100
+++ /var/tmp/diff_new_pack.2OqUIO/_new 2016-12-05 16:30:03.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-Mojolicious
-Version: 7.10
+Version: 7.11
Release: 0
%define cpan_name Mojolicious
Summary: Real-time web framework
++++++ Mojolicious-7.10.tar.gz -> Mojolicious-7.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/Changes new/Mojolicious-7.11/Changes
--- old/Mojolicious-7.10/Changes 2016-11-01 13:07:05.000000000 +0100
+++ new/Mojolicious-7.11/Changes 2016-11-30 00:24:18.000000000 +0100
@@ -1,4 +1,15 @@
+7.11 2016-11-30
+ - Added EXPERIMENTAL close_idle_connections method to Mojo::Server::Daemon.
+ - Improved one_tick method in Mojo::IOLoop to protect from recursion, similar
+ to the start method.
+ - Improved log attribute in Mojolicious to make it easier to override default
+ settings. (jberger)
+ - Fixed bug in Mojo::Server::Prefork where workers would accept keep-alive
+ requests after a graceful shutdown had already been initiated.
+ - Fixed bugs in Mojo::Util and Mojo::Asset::File where incomplete writes would
+ not be recognized as errors. (bobkare, sri)
+
7.10 2016-11-01
- Added getopt function to Mojo::Util.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/META.json new/Mojolicious-7.11/META.json
--- old/Mojolicious-7.10/META.json 2016-11-01 20:01:02.000000000 +0100
+++ new/Mojolicious-7.11/META.json 2016-11-30 10:22:52.000000000 +0100
@@ -58,6 +58,6 @@
},
"x_IRC" : "irc://irc.perl.org/#mojo"
},
- "version" : "7.10",
+ "version" : "7.11",
"x_serialization_backend" : "JSON::PP version 2.27400"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/META.yml new/Mojolicious-7.11/META.yml
--- old/Mojolicious-7.10/META.yml 2016-11-01 20:01:01.000000000 +0100
+++ new/Mojolicious-7.11/META.yml 2016-11-30 10:22:52.000000000 +0100
@@ -31,5 +31,5 @@
homepage: http://mojolicious.org
license: http://www.opensource.org/licenses/artistic-license-2.0
repository: https://github.com/kraih/mojo.git
-version: '7.10'
+version: '7.11'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Asset/File.pm new/Mojolicious-7.11/lib/Mojo/Asset/File.pm
--- old/Mojolicious-7.10/lib/Mojo/Asset/File.pm 2016-07-19 02:38:18.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/Asset/File.pm 2016-11-29 18:15:44.000000000 +0100
@@ -46,7 +46,8 @@
sub add_chunk {
my ($self, $chunk) = @_;
- defined $self->handle->syswrite($chunk) or croak "Can't write to asset: $!";
+ ($self->handle->syswrite($chunk) // -1) == length $chunk
+ or croak "Can't write to asset: $!";
return $self;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/IOLoop.pm new/Mojolicious-7.11/lib/Mojo/IOLoop.pm
--- old/Mojolicious-7.10/lib/Mojo/IOLoop.pm 2016-09-23 14:34:21.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/IOLoop.pm 2016-11-29 18:30:36.000000000 +0100
@@ -81,7 +81,11 @@
return $self->reactor->next_tick(sub { $self->$cb });
}
-sub one_tick { _instance(shift)->reactor->one_tick }
+sub one_tick {
+ my $self = _instance(shift);
+ croak 'Mojo::IOLoop already running' if $self->is_running;
+ $self->reactor->one_tick;
+}
sub recurring { shift->_timer(recurring => @_) }
@@ -333,7 +337,8 @@
shutting down gracefully without interrupting existing connections, defaults to
C<0>. Setting the value to C<0> will allow this event loop to accept new
connections indefinitely. Note that up to half of this value can be subtracted
-randomly to improve load balancing between multiple server processes.
+randomly to improve load balancing between multiple server processes, and to
+make sure that not all of them restart at the same time.
=head2 max_connections
@@ -482,8 +487,7 @@
Mojo::IOLoop->one_tick;
$loop->one_tick;
-Run event loop until an event occurs. Note that this method can recurse back
-into the reactor, so you need to be careful.
+Run event loop until an event occurs.
# Don't block longer than 0.5 seconds
my $id = Mojo::IOLoop->timer(0.5 => sub {});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Reactor/EV.pm new/Mojolicious-7.11/lib/Mojo/Reactor/EV.pm
--- old/Mojolicious-7.10/lib/Mojo/Reactor/EV.pm 2016-07-19 02:38:18.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/Reactor/EV.pm 2016-11-07 23:29:54.000000000 +0100
@@ -144,8 +144,7 @@
$reactor->one_tick;
-Run reactor until an event occurs or no events are being watched anymore. Note
-that this method can recurse back into the reactor, so you need to be careful.
+Run reactor until an event occurs or no events are being watched anymore.
# Don't block longer than 0.5 seconds
my $id = $reactor->timer(0.5 => sub {});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Reactor/Poll.pm new/Mojolicious-7.11/lib/Mojo/Reactor/Poll.pm
--- old/Mojolicious-7.10/lib/Mojo/Reactor/Poll.pm 2016-07-19 02:38:18.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/Reactor/Poll.pm 2016-11-07 23:29:38.000000000 +0100
@@ -232,8 +232,7 @@
$reactor->one_tick;
-Run reactor until an event occurs or no events are being watched anymore. Note
-that this method can recurse back into the reactor, so you need to be careful.
+Run reactor until an event occurs or no events are being watched anymore.
# Don't block longer than 0.5 seconds
my $id = $reactor->timer(0.5 => sub {});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Server/Daemon.pm new/Mojolicious-7.11/lib/Mojo/Server/Daemon.pm
--- old/Mojolicious-7.10/lib/Mojo/Server/Daemon.pm 2016-08-27 04:08:11.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/Server/Daemon.pm 2016-11-29 17:34:10.000000000 +0100
@@ -25,6 +25,13 @@
$loop->remove($_) for keys %{$self->{connections} || {}}, @{$self->acceptors};
}
+sub close_idle_connections {
+ my $self = shift;
+ my $c = $self->{connections};
+ my $loop = $self->ioloop;
+ !$c->{$_}{tx} and $c->{$_}{requests} and $loop->remove($_) for keys %$c;
+}
+
sub run {
my $self = shift;
@@ -455,6 +462,13 @@
LMojo::Server::Daemon inherits all methods from LMojo::Server and
implements the following new ones.
+=head2 close_idle_connections
+
+ $daemon->close_idle_connections;
+
+Close all connections without active requests. Note that this method is
+EXPERIMENTAL and might change without warning!
+
=head2 run
$daemon->run;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Server/Hypnotoad.pm new/Mojolicious-7.11/lib/Mojo/Server/Hypnotoad.pm
--- old/Mojolicious-7.10/lib/Mojo/Server/Hypnotoad.pm 2016-08-01 02:01:37.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/Server/Hypnotoad.pm 2016-11-29 18:37:34.000000000 +0100
@@ -8,7 +8,7 @@
use File::Basename 'dirname';
use File::Spec::Functions 'catfile';
use Mojo::Server::Prefork;
-use Mojo::Util qw(steady_time);
+use Mojo::Util 'steady_time';
use Scalar::Util 'weaken';
has prefork => sub { Mojo::Server::Prefork->new(listen => ['http://*:8080']) };
@@ -254,7 +254,8 @@
gracefully and then getting replaced with a newly started worker, defaults to
the value of LMojo::Server::Prefork/"accepts". Setting the value to C<0> will
allow workers to accept new connections indefinitely. Note that up to half of
-this value can be subtracted randomly to improve load balancing.
+this value can be subtracted randomly to improve load balancing, and to make
+sure that not all workers restart at the same time.
=head2 backlog
@@ -280,7 +281,9 @@
Maximum amount of time in seconds stopping a worker gracefully may take before
being forced, defaults to the value of
-LMojo::Server::Prefork/"graceful_timeout".
+LMojo::Server::Prefork/"graceful_timeout". Note that this value should usually
+be a little larger than the maximum amount of time you expect any one request to
+take.
=head2 heartbeat_interval
@@ -295,7 +298,9 @@
Maximum amount of time in seconds before a worker without a heartbeat will be
stopped gracefully, defaults to the value of
-LMojo::Server::Prefork/"heartbeat_timeout".
+LMojo::Server::Prefork/"heartbeat_timeout". Note that this value should
+usually be a little larger than the maximum amount of time you expect any one
+operation to block the event loop.
=head2 inactivity_timeout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Server/Prefork.pm new/Mojolicious-7.11/lib/Mojo/Server/Prefork.pm
--- old/Mojolicious-7.10/lib/Mojo/Server/Prefork.pm 2016-08-01 02:02:21.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojo/Server/Prefork.pm 2016-11-29 18:31:37.000000000 +0100
@@ -148,6 +148,7 @@
# Clean worker environment
$SIG{$_} = 'DEFAULT' for qw(CHLD INT TERM TTIN TTOU);
$SIG{QUIT} = sub { $loop->stop_gracefully };
+ $loop->on(finish => sub { $self->max_requests(1)->close_idle_connections });
delete $self->{reader};
srand;
@@ -357,7 +358,8 @@
gracefully and then getting replaced with a newly started worker, passed along
to LMojo::IOLoop/"max_accepts", defaults to C<10000>. Setting the value to
C<0> will allow workers to accept new connections indefinitely. Note that up to
-half of this value can be subtracted randomly to improve load balancing.
+half of this value can be subtracted randomly to improve load balancing, and to
+make sure that not all workers restart at the same time.
=head2 cleanup
@@ -373,7 +375,8 @@
$prefork = $prefork->graceful_timeout(15);
Maximum amount of time in seconds stopping a worker gracefully may take before
-being forced, defaults to C<20>.
+being forced, defaults to C<20>. Note that this value should usually be a little
+larger than the maximum amount of time you expect any one request to take.
=head2 heartbeat_interval
@@ -388,7 +391,9 @@
$prefork = $prefork->heartbeat_timeout(2);
Maximum amount of time in seconds before a worker without a heartbeat will be
-stopped gracefully, defaults to C<20>.
+stopped gracefully, defaults to C<20>. Note that this value should usually be a
+little larger than the maximum amount of time you expect any one operation to
+block the event loop.
=head2 pid_file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojo/Util.pm new/Mojolicious-7.11/lib/Mojo/Util.pm
--- old/Mojolicious-7.10/lib/Mojo/Util.pm 2016-11-01 18:19:36.000000000 +0100
+++ new/Mojolicious-7.11/lib/Mojo/Util.pm 2016-11-29 18:15:48.000000000 +0100
@@ -269,7 +269,7 @@
sub spurt {
my ($content, $path) = @_;
open my $file, '>', $path or croak qq{Can't open file "$path": $!};
- defined $file->syswrite($content)
+ ($file->syswrite($content) // -1) == length $content
or croak qq{Can't write to file "$path": $!};
return $content;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.10/lib/Mojolicious/Guides/Cookbook.pod new/Mojolicious-7.11/lib/Mojolicious/Guides/Cookbook.pod
--- old/Mojolicious-7.10/lib/Mojolicious/Guides/Cookbook.pod 2016-09-23 15:20:47.000000000 +0200
+++ new/Mojolicious-7.11/lib/Mojolicious/Guides/Cookbook.pod 2016-11-25 15:11:21.000000000 +0100
@@ -249,8 +249,7 @@