Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Mojolicious-Plugin-Status for openSUSE:Factory checked in at 2021-02-25 18:28:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-Status (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-Status.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious-Plugin-Status" Thu Feb 25 18:28:45 2021 rev:12 rq:874816 version:1.15 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-Status/perl-Mojolicious-Plugin-Status.changes 2021-02-15 23:16:48.799441782 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-Status.new.2378/perl-Mojolicious-Plugin-Status.changes 2021-02-25 18:28:47.414233206 +0100 @@ -1,0 +2,10 @@ +Sun Feb 21 03:12:42 UTC 2021 - Tina M??ller <timueller+p...@suse.de> + +- updated to 1.15 + see /usr/share/doc/packages/perl-Mojolicious-Plugin-Status/Changes + + 1.15 2021-02-20 + - Improved Mojolicious::Plugin::Status to log if server is not supported. + - Improved template design. + +------------------------------------------------------------------- Old: ---- Mojolicious-Plugin-Status-1.14.tar.gz New: ---- Mojolicious-Plugin-Status-1.15.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious-Plugin-Status.spec ++++++ --- /var/tmp/diff_new_pack.CZPlsO/_old 2021-02-25 18:28:48.058233623 +0100 +++ /var/tmp/diff_new_pack.CZPlsO/_new 2021-02-25 18:28:48.062233627 +0100 @@ -18,7 +18,7 @@ %define cpan_name Mojolicious-Plugin-Status Name: perl-Mojolicious-Plugin-Status -Version: 1.14 +Version: 1.15 Release: 0 Summary: Mojolicious server status License: Artistic-2.0 ++++++ Mojolicious-Plugin-Status-1.14.tar.gz -> Mojolicious-Plugin-Status-1.15.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-Status-1.14/Changes new/Mojolicious-Plugin-Status-1.15/Changes --- old/Mojolicious-Plugin-Status-1.14/Changes 2021-02-09 01:00:35.000000000 +0100 +++ new/Mojolicious-Plugin-Status-1.15/Changes 2021-02-20 00:46:05.000000000 +0100 @@ -1,4 +1,8 @@ +1.15 2021-02-20 + - Improved Mojolicious::Plugin::Status to log if server is not supported. + - Improved template design. + 1.14 2021-02-09 - Switched back to Sereal for serialization in Mojo::MemoryMap to reduce memory usage. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-Status-1.14/META.json new/Mojolicious-Plugin-Status-1.15/META.json --- old/Mojolicious-Plugin-Status-1.14/META.json 2021-02-09 01:02:48.000000000 +0100 +++ new/Mojolicious-Plugin-Status-1.15/META.json 2021-02-20 15:57:15.000000000 +0100 @@ -4,7 +4,7 @@ "Sebastian Riedel <s...@cpan.org>" ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.58, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.60, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], @@ -61,6 +61,6 @@ "web" : "https://webchat.freenode.net/#mojo" } }, - "version" : "1.14", + "version" : "1.15", "x_serialization_backend" : "JSON::PP version 4.06" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-Status-1.14/META.yml new/Mojolicious-Plugin-Status-1.15/META.yml --- old/Mojolicious-Plugin-Status-1.14/META.yml 2021-02-09 01:02:48.000000000 +0100 +++ new/Mojolicious-Plugin-Status-1.15/META.yml 2021-02-20 15:57:15.000000000 +0100 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.58, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.60, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -33,5 +33,5 @@ homepage: https://mojolicious.org license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/mojolicious/mojo-status.git -version: '1.14' +version: '1.15' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-Status-1.14/lib/Mojo/MemoryMap/Writer.pm new/Mojolicious-Plugin-Status-1.15/lib/Mojo/MemoryMap/Writer.pm --- old/Mojolicious-Plugin-Status-1.14/lib/Mojo/MemoryMap/Writer.pm 2021-02-09 00:51:48.000000000 +0100 +++ new/Mojolicious-Plugin-Status-1.15/lib/Mojo/MemoryMap/Writer.pm 2021-02-09 12:22:40.000000000 +0100 @@ -8,9 +8,9 @@ sub change { my ($self, $cb) = @_; - my $stats = $self->fetch; - $cb->($_) for $stats; - return $self->store($stats); + my $data = $self->fetch; + $cb->($_) for $data; + return $self->store($data); } sub fetch { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-Status-1.14/lib/Mojolicious/Plugin/Status.pm new/Mojolicious-Plugin-Status-1.15/lib/Mojolicious/Plugin/Status.pm --- old/Mojolicious-Plugin-Status-1.14/lib/Mojolicious/Plugin/Status.pm 2021-01-04 00:09:06.000000000 +0100 +++ new/Mojolicious-Plugin-Status-1.15/lib/Mojolicious/Plugin/Status.pm 2021-02-20 15:40:33.000000000 +0100 @@ -10,7 +10,7 @@ use constant MACOS => $^O eq 'darwin'; -our $VERSION = '1.14'; +our $VERSION = '1.15'; sub register { my ($self, $app, $config) = @_; @@ -109,9 +109,10 @@ } sub _read_write { - my ($record, $id) = @_; + my ($all, $id) = @_; return unless my $stream = Mojo::IOLoop->stream($id); - @{$record}{qw(bytes_read bytes_written)} = ($stream->bytes_read, $stream->bytes_written); + @{$all->{workers}{$$}{connections}{$id}}{qw(bytes_read bytes_written)} + = ($stream->bytes_read, $stream->bytes_written); } sub _request { @@ -133,7 +134,7 @@ query => $url->query->to_string, started => time }; - _read_write($_->{workers}{$$}{connections}{$id}, $id); + _read_write($_, $id); $_->{workers}{$$}{connections}{$id}{client} = $tx->remote_address; }); @@ -151,8 +152,7 @@ elsif ($code > 199) { $_->{stats}{success}++ } elsif ($code) { $_->{stats}{info}++ } - $worker->{connections}{$id}{request}{finished} = time; - $worker->{connections}{$id}{request}{status} = $code; + @{$worker->{connections}{$id}{request}}{qw(finished status)} = (time, $code); $worker->{connections}{$id}{processed}++; $worker->{processed}++; $_->{processed}++; @@ -164,14 +164,13 @@ sub _rendered { my ($self, $c) = @_; - my $id = $c->tx->connection; - my $map = $self->{map}; - my $conn = $map->writer->fetch->{workers}{$$}{connections}{$id}; - return unless $conn && (my $req = $conn->{request}); - $req->{time} = time - $req->{started}; - @{$req}{qw(client status worker)} = ($conn->{client}, $c->res->code, $$); + my $id = $c->tx->connection; + $self->{map}->writer->change(sub { + return unless my $conn = $_->{workers}{$$}{connections}{$id}; + return unless my $req = $conn->{request}; + $req->{time} = time - $req->{started}; + @{$req}{qw(client status worker)} = ($conn->{client}, $c->res->code, $$); - $map->writer->change(sub { my $slowest = $_->{slowest}; @$slowest = sort { $b->{time} <=> $a->{time} } @$slowest, $req; my %seen; @@ -189,9 +188,7 @@ # macOS actually returns bytes instead of kilobytes $_->{workers}{$$}{maxrss} = $_->{workers}{$$}{maxrss} * 1000 unless MACOS; - for my $id (keys %{$_->{workers}{$$}{connections}}) { - _read_write($_->{workers}{$$}{connections}{$id}, $id); - } + for my $id (keys %{$_->{workers}{$$}{connections}}) { _read_write($_, $id) } }); } @@ -212,7 +209,9 @@ sub _start { my ($self, $server, $app) = @_; - return unless $server->isa('Mojo::Server::Daemon'); + + return $app->log->warn('Server not suported by Mojolicious::Plugin::Status') + unless $server->isa('Mojo::Server::Daemon'); # Register started workers Mojo::IOLoop->next_tick(sub { @@ -235,9 +234,7 @@ Mojo::IOLoop->recurring(5 => sub { $self->_resources }); } -sub _stats { - return {started => time, info => 0, success => 0, redirect => 0, client_error => 0, server_error => 0}; -} +sub _stats { {started => time, info => 0, success => 0, redirect => 0, client_error => 0, server_error => 0} } sub _stream { my ($self, $id) = @_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-Status-1.14/lib/Mojolicious/Plugin/resources/templates/mojo-status/dashboard.html.ep new/Mojolicious-Plugin-Status-1.15/lib/Mojolicious/Plugin/resources/templates/mojo-status/dashboard.html.ep --- old/Mojolicious-Plugin-Status-1.14/lib/Mojolicious/Plugin/resources/templates/mojo-status/dashboard.html.ep 2020-02-13 12:21:40.000000000 +0100 +++ new/Mojolicious-Plugin-Status-1.15/lib/Mojolicious/Plugin/resources/templates/mojo-status/dashboard.html.ep 2021-02-20 03:57:29.000000000 +0100 @@ -7,9 +7,7 @@ % end % my $localtime = sub { -% my ($time, $with_date) = @_; -% my ($s, $m, $h, $day, $month, $year) = localtime $time; -% return sprintf '%02d:%02d:%02d', $h, $m ,$s unless $with_date; +% my ($s, $m, $h, $day, $month, $year) = localtime(shift); % return sprintf '%04d-%02d-%02d %02d:%02d:%02d', $year + 1900, $month + 1, % $day, $h, $m, $s; % }; @@ -29,7 +27,7 @@ </tr> <tr> <th class="fit text-left noleftpad" scope="row"> - <i class="fas fa-rocket"></i> + <i class="fas fa-microchip"></i> </th> <th class="fit text-left noleftpad" scope="row">Plugin:</th> <td> @@ -38,14 +36,22 @@ </tr> <tr> <th class="fit text-left noleftpad" scope="row"> - <i class="fas fa-clock"></i> + <i class="fas fa-rocket"></i> </th> <th class="fit text-left noleftpad" scope="row">Uptime:</th> <td> % my $uptime = int(($now - $all->{started}) / 86400); <%= "$uptime " . ($uptime == 1 ? 'day' : 'days') %> + </td> + </tr> + <tr> + <th class="fit text-left noleftpad" scope="row"> + <i class="fas fa-clock"></i> + </th> + <th class="fit text-left noleftpad" scope="row">Started:</th> + <td> <span class="badge badge-dark"> - <%= $localtime->($all->{started}, 0) %> + <%= $localtime->($all->{started}) %> </span> </td> </tr> @@ -204,7 +210,7 @@ <td><%= $row->[4] %></td> <td> <span class="badge badge-dark"> - <%= $localtime->($row->[5], 1) %> + <%= $localtime->($row->[5]) %> </span> </td> </tr>