est_name/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase;
my $json = $req->content;
my $stats = decode_json($json);
my $res = resp(200);
$res->stream(
env => $req->env,
content_type => 'application/x-jsonl; charse
{
my $data = $self->build_stat($project => shift(@$stats));
return encode_json($data) . "\n";
},
);
return $res;
}
my %VALID_TYPES = (
run_list
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("hosts");
__PACKAGE__->add_columns(
"host_id",
{ data_type => "bigint
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("permissions");
__PACKAGE__->add_columns(
"permission_id",
{ data_typ
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("source_files");
__PACKAGE__->add_columns(
"source_file_id",
{ data_t
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("versions");
__PACKAGE__->add_columns(
"version",
{ data_type => "dec
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("primary_email");
__PACKAGE__->add_columns(
"user_id",
{ data_type =>
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("job_try_fields");
__PACKAGE__->add_columns(
"event_uuid",
{ data_typ
"name",
{ data_type => "varchar", is_nullable => 0, size => 64 },
"data",
{ data_type => "json", is_nullable => 1 },
"details",
{ data_type => "text", is_nullable => 1 },
"raw",
{ data
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("binaries");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type => "
w/share_dir/;
use App::Yath::Schema::Util qw/find_job is_mysql/;
use Test2::Harness::Util::JSON qw/encode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase qw/-tit
nt_type => 'application/x-jsonl; charset=utf-8',
done => $advance,
fetch => sub {
$advance->() unless @out;
return @out ? encode_json(shift(@out)) . "\n" : ();
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("email");
__PACKAGE__->add_columns(
"email_id",
{ data_type => "bigin
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("log_files");
__PACKAGE__->add_columns(
"log_file_id",
{ data_type =>
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("resources");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type =>
},
"resource_ord",
{ data_type => "integer", is_nullable => 0 },
"data",
{ data_type => "json", is_nullable => 0 },
);
__PACKAGE__->set_primary_key("resource_id");
__PACKAGE__->add_unique_con
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("test_files");
__PACKAGE__->add_columns(
"test_file_id",
{ data_type
hare_dir/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase
t eq 'delete') {
$field->delete;
}
}
$res->content_type('application/json');
$res->raw_body($field);
return $res;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAM
/find_job/;
use App::Yath::Schema::DateTimeFormat qw/DTF/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Util::Times qw/render_duration/;
use parent 'App::Yath::Server::Contr
h->execute($run->run_id, $ord);
return {ord => $ord, resources => [map { $_->{data} = decode_json($_->{data}); $_ } @{$sth->fetchall_arrayref({})}]};
}
sub res_ord {
my $self = shift;
my
ata = $self->get_up_to($run, $ord);
my $res = resp(200);
$res->content_type('application/json');
$res->raw_body($data);
return $res;
}
sub res_stream {
my $self = shift;
my (
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::
> 'Missing route') unless $route;
my $idx = $route->{idx} //= 0;
my $json = $route->{json};
my $project_name = $route->{project};
my $source = $route->{source};
il'}],
'+as' => ['job_try_id', 'job_try_ord', 'fail'],
},
);
unless($json) {
$res->content_type('text/plain');
my $body = join "\n" => map { $_->file } $fi
hare_dir/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::
unless $run;
my $data = $run->rerun_data;
$res->content_type('application/json');
$res->raw_body($data);
return $res;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::
tent_type => 'application/x-jsonl; charset=utf-8',
cache => 0,
headers => ["content-disposition" => 'attachment; filename="coverage.jsonl"'],
done => s
fetch => sub {
if (my $item = $iter->()) {
return encode_json($item) . "\n";
}
else {
$done = 1;
_and_try/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase q
job->name) . ' - ' . $job->job_id . '+' . $try->job_try_ord;
$res->content_type('application/json');
$res->raw_body({job => $job, try => $try});
return $res;
}
1;
__END__
=pod
=encodi