NAME

CPAN::Testers::Backend::Migrate::MetabaseCache - Migrate old metabase cache to new test report format

VERSION

version 0.005

SYNOPSIS

beam run <container> <service> [--force | -f]

DESCRIPTION

This task migrates the reports in the metabase.metabase table to the cpanstats.test_report table. This will enable us to drop the metabase database altogether.

ATTRIBUTES

metabase_dbh

The DBI object connected to the metabase database.

schema

The CPAN::Testers::Schema to write reports to.

METHODS

process_sth

Process the given statement handle full of reports. Returns the number of reports processed

find_unprocessed_entries

$sth = $self->find_unprocessed_entries;

Returns a DBI statement handle on to a list of metabase.metabase row hashrefs for reports that are not in the main test report table (managed by CPAN::Testers::Schema::Result::TestReport).

find_entries

$sth = $self->find_entries;
$sth = $self->find_entries( @ids );

Find all the cache entries to be processed by this module, optionally limited only to the IDs passed-in. Returns a list of row hashrefs.

parse_metabase_report

This sub undoes the processing that CPAN Testers expects before it is put in the database so we can ensure that the report was submitted correctly.

This code is stolen from CPAN::Testers::Data::Generator sub load_fact

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.