From: Marius Gavrilescu Date: Fri, 28 Feb 2014 15:53:18 +0000 (+0200) Subject: Move lastjob to the user hash X-Git-Tag: 5999.000_002~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=db5da8eaf53881f215970b8030827b5f6d844efa;p=gruntmaster-data.git Move lastjob to the user hash --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index 4592ac1..ce39b5d 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -78,7 +78,7 @@ sub defhash{ defhash problem => qw/name level difficulty statement owner author private generator runner judge testcnt timeout olimit/; defhash contest => qw/start end name owner/; defhash job => qw/date errors extension filesize private problem result result_text user/; -defhash user => qw/name email town university level/; +defhash user => qw/name email lastjob town university level/; sub clean_job (_){ HDEL cp . "job.$_[0]", qw/result result_text results daemon/ @@ -94,14 +94,6 @@ sub get_open { HGET cp . 'open', "$problem.$user"; } -sub lastjob { - HGET 'lastjob', $_[0]; -} - -sub set_lastjob { - HSET 'lastjob', $_[0], time; -} - our @EXPORT = do { no strict 'refs'; grep { $_ =~ /^[a-zA-Z]/ and exists &$_ } keys %{__PACKAGE__ . '::'};