NAME
CPAN::Testers::Backend::ProcessReports - Process an incoming test report into useful statistics
VERSION
version 0.005
SYNOPSIS
beam run <container> <task> [--force | -f] [<reportid>...]
DESCRIPTION
This module is a Beam::Runnable task that reads incoming test reports from testers and produces the basic stats needed for the common reporting on the website and via e-mail. This is the first step in processing test data: All other tasks require this step to be completed.
ATTRIBUTES
schema
A CPAN::Testers::Schema object to access the database.
metabase_dbh
A DBI object connected to the Metabase cache. This is a legacy database needed for some parts of the web app and backend. When these parts are updated to use the new test reports, we can remove this attribute.
METHODS
run
The main method that processes job arguments and performs the task. Called by Beam::Runner or Beam::Minion.
find_unprocessed_reports
Returns a list of CPAN::Testers::Schema::Result::TestReport objects for reports that are not in the cpanstats table.
find_reports
@reports = $self->find_reports;
@reports = $self->find_reports( @ids );
Find all the test reports to be processed by this module, optionally limited only to the IDs passed-in. Returns a list of CPAN::Testers::Schema::Result::TestReport objects.
write_metabase_cache
$self->write_metabase_cache( $report_row, $stat_row );
Write the report to the legacy metabase cache. This cache is used for some of the web apps and some of the backend processes. Until those processes are changed to use the new test report format, we need to maintain the old metabase cache.
Once the legacy metabase cache is removed, this method can be removed
write_builder_update
$self->write_builder_update( $stat_row );
Write entries to the page_requests
table to tell the legacy webapp report builders that they need to update the static data caches for this distribution and this distribution's author.
ARGUMENTS
reportid
The IDs of reports to process. If specified, the report will be processed whether or not it was processed already (like --force
option).
OPTIONS
--force | -f
Force re-processing of all reports. This will process all of the test reports again, so it may be prudent to limit to a set of test reports using the reportid
argument.
SEE ALSO
CPAN::Testers::Backend, CPAN::Testers::Schema, Beam::Runnable
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.