use Gruntmaster::Daemon::Constants qw/ERR/;
use Gruntmaster::Daemon::Format qw/mkrun/;
-use Gruntmaster::Page qw/generate/;
use Gruntmaster::Data qw/job_inmeta job_problem problem_meta set_job_daemon set_job_result set_job_result_text set_job_results SUBSCRIBE WAIT_FOR_MESSAGES/;
+use Gruntmaster::Page::Log;
use File::Basename qw/fileparse/;
use File::Slurp qw/write_file/;
set_job_results $job, \@full_results if scalar @full_results;
my $log = $meta->{contest} ? "ct/$meta->{contest}/log" : 'log';
- write_file "$log/src/$job." . Gruntmaster::Page::Log::FORMAT_EXTENSION->{$meta->{files}{prog}{format}}, $meta->{files}{prog}{content};
- generate "$log/job/$job.html";
+ PUBLISH gensrc => $job;
+ PUBLISH genpage => "$log/job/$job.html";
my $page = ($job + Gruntmaster::Page::Log::PAGE_SIZE - 1) / Gruntmaster::Page::Log::PAGE_SIZE;
- generate "$log/$page.html"
+ PUBLISH genpage => "$log/$page.html"
}
sub got_job{