From: Marius Gavrilescu Date: Fri, 28 Feb 2014 21:09:34 +0000 (+0200) Subject: Use new lastjob X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=b643b4e844a3d9b9d32dbba977a7cd4181575296;p=plack-app-gruntmaster.git Use new lastjob --- diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index ea67c2b..535a536 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -25,8 +25,8 @@ sub generate{ die if defined $contest && (time > contest_end $contest); return reply 'A required parameter was not supplied' if grep { !defined } $problem, $format, $prog; return reply 'Maximum source size is 10KB' if length $prog > 25 * 1024; - return reply 'You must wait 30 seconds between jobs' unless time > lastjob ($r->user) + 30; - set_lastjob $r->user; + return reply 'You must wait 30 seconds between jobs' unless time > user_lastjob ($r->user) + 30; + set_user_lastjob $r->user, time; local $Gruntmaster::Data::contest = $contest if $contest;