From 95ea982c47736f78aa3d4c95b64907a917494ec0 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 25 Jan 2014 22:30:26 +0200 Subject: [PATCH] Use new gensrc/genpage interface to gruntmaster-paged --- lib/Gruntmaster/Daemon.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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{ -- 2.30.2