use Gruntmaster::Daemon::Constants qw/ERR/;
use Gruntmaster::Daemon::Format qw/mkrun/;
use Gruntmaster::Data;
-use Gruntmaster::Page::Log;
use File::Basename qw/fileparse/;
use File::Slurp qw/write_file/;
use YAML::Any qw/LoadFile DumpFile/;
use Log::Log4perl qw/get_logger/;
+use constant PAGE_SIZE => 10;
+
##################################################
sub safe_can_nodie {
$meta = job_inmeta $job;
if (job_problem $job) {
my $pbmeta = problem_meta job_problem $job;
- my %files = %{$meta->{files}};
+ my %files = exists $meta->{files} ? %{$meta->{files}} : ();
$meta = {%$meta, %$pbmeta};
$meta->{files} = {%files, %{$pbmeta->{files}}} if exists $pbmeta->{files};
}
set_job_errors $job, $errors;
my $log = $Gruntmaster::Data::contest ? "ct/$Gruntmaster::Data::contest/log" : 'log';
- PUBLISH gensrc => "$Gruntmaster::Data::contest.$job";
+
+ PUBLISH gensrc => ($Gruntmaster::Data::contest // '') . ".$job";
PUBLISH genpage => "$log/job/$job.html";
PUBLISH genpage => "$log/index.html";
PUBLISH genpage => "$log/st.html";
- my $page = ($job + Gruntmaster::Page::Log::PAGE_SIZE - 1) / Gruntmaster::Page::Log::PAGE_SIZE;
+ my $page = ($job + PAGE_SIZE - 1) / PAGE_SIZE;
PUBLISH genpage => "$log/@{[$page - 1]}.html";
PUBLISH genpage => "$log/$page.html";
PUBLISH genpage => "$log/@{[$page + 1]}.html";