onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("reporting");
__PACKAGE__->add_columns(
"reporting_id",
{ data_type =
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("source_subs");
__PACKAGE__->add_columns(
"source_sub_id",
{ data_typ
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("email_verification_codes");
__PACKAGE__->add_columns(
"evcode",
{ da
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("job_tries");
__PACKAGE__->add_columns(
"job_try_uuid",
{ data_type =
lue => \"null",
is_nullable => 1,
size => [14, 4],
},
"parameters",
{ data_type => "json", default_value => \"null", is_nullable => 1 },
"stdout",
{ data_type => "text", default_valu
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("api_keys");
__PACKAGE__->add_columns(
"api_key_id",
{ data_type => "
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("config");
__PACKAGE__->add_columns(
"config_id",
{ data_type => "int
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("test_files");
__PACKAGE__->add_columns(
"test_file_id",
{ data_type
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("sweeps");
__PACKAGE__->add_columns(
"sweep_id",
{ data_type => "inte
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("events");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type => "uu
ool", is_nullable => 0 },
"facets",
{ data_type => "json", default_value => \"null", is_nullable => 1 },
"rendered",
{ data_type => "json", default_value => \"null", is_nullable => 1 },
);
__P
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("session_hosts");
__PACKAGE__->add_columns(
"session_host_id",
{ data
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("coverage");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type => "
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("sessions");
__PACKAGE__->add_columns(
"session_uuid",
{ data_type =>
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("runs");
__PACKAGE__->add_columns(
"run_uuid",
{ data_type => "uuid",
a_type => "bool", default_value => \"null", is_nullable => 1 },
"parameters",
{ data_type => "json", default_value => \"null", is_nullable => 1 },
"worker_id",
{ data_type => "text", default_v
arent 'App::Yath::Command';
use Test2::Harness::Util::HashBase;
use Test2::Harness::Util::JSON qw/decode_json/;
use LWP;
use LWP::UserAgent;
use Getopt::Yath;
include_options(
'App::Yath::Optio
log file" unless -f $log;
die "'$log' does not look like a log file" unless $log =~ m/\.jsonl(\.(gz|bz2))?$/;
my $api_key = $settings->webclient->api_key or die "No API key was specifie
,
json => 1,
log_file => [$log],
],
);
if ($res->is_success) {
my $json = $res->decoded_content;
my $data = decode_json($json);
pr
est2::Harness::IPC::Util qw/check_pipe ipc_warn pid_is_running/;
use Test2::Harness::Util::JSON qw/decode_json/;
use Test2::Harness::Instance::Message;
use Test2::Harness::Instance::Request;
use Test
;
my $json = $self->{+READ_PIPE}->read_message;
next if !$json && $! == EINTR;
last unless $json;
my $msg;
unless (eval { $msg = decode_json($json); 1 }) {
ipc_warn(error => $@, input_json => $json, input => $msg);
next;
}
$count++;
if (my $class = $msg->{class}) {
require(mod2file($class));
h::Schema::Util qw/schema_config_from_settings format_duration/;
use Test2::Harness::Util::JSON qw/decode_json/;
use App::Yath::Schema::RunProcessor;
use parent 'App::Yath::Command';
use Test2::Harn
ath database" }
sub group { ["database", 'log parsing'] }
sub cli_args { "[--] event_log.jsonl[.gz|.bz2]" }
sub description { "Publish a log file directly to a yath database" }
sub run {
id log file" unless -f $file;
die "'$file' does not look like a log file" unless $file =~ m/\.jsonl(\.(gz|bz2))?$/;
my $lines = 0;
my $fh;
if ($file =~ m/\.bz2$/) {
$fh = IO::
file = $self->{+SUMMARY_FILE}) {
require Test2::Harness::Util::File::JSON;
Test2::Harness::Util::File::JSON->new(name => $file)->write($new);
}
}
sub _audit {
my $self = shift
ge Test2::Harness::Util::File::JSONL;
use strict;
use warnings;
our $VERSION = '2.000004';
use Carp qw/croak/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'Test2::Harness
{ shift; decode_json($_[0]) }
sub encode { shift; encode_json(@_) . "\n" }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Test2::Harness::Util::File::JSONL - Utility class for a JSONL file (stream)
les
encoding/decoding JSONL data.
=head1 SYNOPSIS
use Test2::Harness::Util::File::JSONL;
my $jsonl = Test2::Harness::Util::File::JSONL->new(name => '/path/to/file.jsonl');
while (1) {
ct ipc_warn ipc_loop pid_is_running inflate set_procname/;
use Test2::Harness::Util::JSON qw/decode_json encode_json/;
use Test2::Harness::Collector::Preloaded;
use Test2::Harness::Util::HashBase qw
STDERR->autoflush(1);
my $ok = eval {
my ($json) = @ARGV;
my $self = $class->new(decode_json($json));
my $got = $self->start();
$EXIT = $go
{pkg}\::EXIT // 255)", # Run it.
encode_json(\%params), # json data for job
]);
return $pid;
}
sub ipc {
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("sweeps");
__PACKAGE__->add_columns(
"sweep_id",
{ data_type => "bigi