| title | published |
|---|---|
A Blog Post |
2021-03-21 |
This will appear in the blog because it has a published field in the frontmatter.
| DBIx::Class::Storage::DBI::_warn_undetermined_driver(): This version of DBIC does not yet seem to supply a driver for your particular RDBMS and/or connection method ('MariaDB'). While we will attempt to continue anyway, the results are likely to be underwhelming. Please upgrade DBIC, and if this message does not go away, file a bugreport including the following info: | |
| { | |
| DBD => "DBD::MariaDB", | |
| DBD_VER => "1.24", | |
| DBIC_DRIVER => "DBIx::Class::Storage::DBI", | |
| DBIC_DSN => sub { | |
| package DBIx::Class::Schema::Versioned; | |
| use warnings; | |
| use strict; | |
| $w_storage->dbh; |
| -+---------------+ | |
| | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | | |
| +---------+-------------+--------------------------------------+-----------+---------+--------+----------------------+-------------------------------------------------------------------------------------------------------------+-----------+---------------+ | |
| | 1 | system user | | NULL | Connect | 773340 | Connecting to master | NULL | 0 | 0 | | |
| | 34 | pmm | pmm.preaction.me:57010 | NULL | Sleep | 3 | | NULL | |
| cpantesters@cpantesters4:~$ find reports-dir/_meta/timestamp -type f | xargs cat | wc -l | |
| 44987 | |
| cpantesters@cpantesters4:~$ du -sh reports-dir/ | |
| 614M reports-dir/ | |
| Exportable Squashfs 4.0 filesystem, lz4 compressed, data block size 131072 | |
| compressed data, compressed metadata, compressed fragments, compressed xattrs | |
| duplicates are removed | |
| Filesystem size 127003.50 Kbytes (124.03 Mbytes) | |
| 30.41% of uncompressed filesystem size (417572.73 Kbytes) |
| -- stats() | |
| EXPLAIN SELECT SUM(job.id IS NOT NULL) AS is_active | |
| FROM minion_workers worker | |
| LEFT JOIN minion_jobs job ON worker.id = job.worker AND job.state = 'active' | |
| GROUP BY worker.id; | |
| EXPLAIN SELECT state, COUNT(state) AS jobs, SUM(`delayed` > NOW()) AS `delayed` | |
| FROM minion_jobs | |
| GROUP BY state; |
| title | published |
|---|---|
A Blog Post |
2021-03-21 |
This will appear in the blog because it has a published field in the frontmatter.
| package Log::Any; | |
| =head1 SYNOPSIS | |
| ### Basic use | |
| # Get a logger that logs to STDERR | |
| use Log::Any; | |
| my $log = Log::Any->new; | |
| # Shortcut |
| sub register( $self, $site ) { | |
| $site->on( build => sub( $event ) { | |
| for my $page ( $event->pages->@* ) { | |
| $page->dom->find( 'img[src$=.mp3]' )->each( sub( $el ) { | |
| $el->replace( '<audio controls><source type="audio/mp3" src="%s"></audio>', $el->attr( 'src' ) ); | |
| } ); | |
| } | |
| } ); | |
| } |
| package Yancy::Backend::DBI; | |
| use Mojo::Base -base, -signatures; | |
| use Yancy::Util qw( fill_brackets ); | |
| use SQL::Abstract; | |
| my %MAP = ( | |
| # schema_name => mapping | |
| # Mapping can be... | |
| # { table => $table_name } # Standard SQL from SQL::Abstract |
| user nginx; | |
| worker_processes auto; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; |
| my $schema = $app->yancy->schema; | |
| for my $key ( keys %$schema ) { | |
| my $props = $schema->{ $key }{ properties }; | |
| $schema->{ $key }{ 'x-list-columns' } = [ grep { $props->{$_}{format} ne 'textarea' } keys %$props ]; | |
| } |