From: Marius Gavrilescu Date: Sat, 25 Jan 2014 20:30:26 +0000 (+0200) Subject: Use new gensrc/genpage interface to gruntmaster-paged X-Git-Tag: 5999.000_001~33 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=95ea982c47736f78aa3d4c95b64907a917494ec0;p=gruntmaster-daemon.git Use new gensrc/genpage interface to gruntmaster-paged --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 98cde4d..6991b7a 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -8,8 +8,8 @@ our $VERSION = '0.001'; 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/; @@ -130,10 +130,10 @@ sub process{ 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{