]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Src.pm
From Redis to Postgres - Part 3 (Bugfixes, first try)
[gruntmaster-page.git] / lib / Gruntmaster / Page / Src.pm
index 77a5cd20cf4511a5e6c8dcf2f95a86d4a1f8081b..4fc2550dc9b2d9c0fcc2889a9331409e74d78301 100644 (file)
@@ -1,11 +1,6 @@
 package Gruntmaster::Page::Src;
 
-use 5.014000;
-use strict;
-use warnings;
 use Gruntmaster::Page::Base;
-our @ISA = qw/Gruntmaster::Page::Base/;
-our $VERSION = '0.001';
 
 use constant CONTENT_TYPES => +{
        c => 'text/x-csrc',
@@ -18,13 +13,10 @@ use constant CONTENT_TYPES => +{
 };
 
 sub generate{
-       my ($self, $format, $logger, $ct, $job, $ext) = @_;
-       debug $logger => "Contest is $ct, job is $job and extension is $ext";
-       local $Gruntmaster::Data::contest = $ct if $ct;
+       my ($self, $format, $env, $job, $ext) = @_;
+       debug $env => "Job is $job and extension is $ext";
 
-       [200, ['Content-Type' => CONTENT_TYPES->{$ext}, 'Cache-Control' => 'max-age=604800'], [job_inmeta($job)->{files}{prog}{content}] ]
+       [200, ['Content-Type' => CONTENT_TYPES->{$ext}, 'Cache-Control' => 'max-age=604800', 'X-Forever' => 1], [db($env)->job($job)->source] ]
 }
 
-sub variants{ [[file => 1, undef, undef, undef, undef, undef]] }
-
 1
This page took 0.017401 seconds and 4 git commands to generate.