Plack::App::ServiceStatus::DBIC - Check DBIC connection
version 0.913
my $schema = YourApp::Schema->connect( ... ); my $status_app = Plack::App::ServiceStatus->new( app => 'your app', DBIC => $schema, );
Gets dbh from the schema object and executes a query, per default select 1;. This query has to return 1 to indicate that everything is ok.
dbh
select 1;
1
You can pass another query when loading Plack::App::ServiceStatus:
Plack::App::ServiceStatus
my $status_app = Plack::App::ServiceStatus->new( app => 'your app', DBIC => [ $schema, ' SELECT CASE WHEN count(*) > 0 THEN 1 ELSE 0 END FROM some_table' ], );
Thomas Klausner <domm@plix.at>
This software is copyright (c) 2016 - 2022 by Thomas Klausner.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Plack::App::ServiceStatus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::App::ServiceStatus
CPAN shell
perl -MCPAN -e shell install Plack::App::ServiceStatus
For more information on module installation, please visit the detailed CPAN module installation guide.