]> iEval git - gruntmaster-daemon.git/commitdiff
Use new gensrc/genpage interface to gruntmaster-paged
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 25 Jan 2014 20:30:26 +0000 (22:30 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 25 Jan 2014 21:08:07 +0000 (23:08 +0200)
lib/Gruntmaster/Daemon.pm

index 98cde4d7c8e17e27d329cafcb5dbb7d615b4878b..6991b7a00a2481fa67971c225bacaf308dda20e1 100644 (file)
@@ -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{
This page took 0.030046 seconds and 4 git commands to generate.