X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FContest.pm;h=a82bc0f2a4fdb85ffc71b9924ea79dec84b536d2;hb=de7226ca2f77bf5d6fab57c61a6fdeb4fcc52c28;hp=e7b72259d7b10fc05c3736a7200347f4fd3405ea;hpb=c29875088440fd6af00925ecd55bf7fb8a59ad4d;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/Contest.pm b/lib/Gruntmaster/Data/Result/Contest.pm index e7b7225..a82bc0f 100644 --- a/lib/Gruntmaster/Data/Result/Contest.pm +++ b/lib/Gruntmaster/Data/Result/Contest.pm @@ -171,8 +171,15 @@ __PACKAGE__->many_to_many("problems", "contest_problems", "problem"); # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:54:00 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IxxZqQwKisBwDabCNUD55Q +use Class::Method::Modifiers qw/after/; use List::Util qw/sum/; +after qw/insert update delete/ => sub { + my ($self) = @_; + Gruntmaster::Data::purge '/ct/'; + Gruntmaster::Data::purge '/ct/' . $self->id; +}; + sub is_pending { my ($self, $time) = @_; $self->start > ($time // time)