X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData.pm;h=741061bfc99409a1c6b47d67aac59ec6be9140ed;hb=64bc7dfb7f8c15cbfa17f9448f3f26889a6dfc3c;hp=16a6176fcf65e6b0cf8c5c5d41590d5e6bdb6c7e;hpb=4db1f7258198bcbb2398e05488f8a0e7a6887337;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index 16a6176..741061b 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -174,10 +174,14 @@ sub job_entry { sub update_status { my ($self) = @_; - my @jobs = $self->jobs->search(undef, {cache => 1})->all; + my @jobs = $self->jobs->search({private => 0}, {cache => 1, prefetch => 'problem'})->all; my %hash; - $hash{$_->get_column('problem'), $_->get_column('owner')} = [$_->id, $_->result ? 0 : 1] for @jobs; + for (@jobs) { + next if !$_->problem->is_in_archive; + $hash{$_->get_column('problem'), $_->get_column('owner')} = [$_->id, $_->result ? 0 : 1] for @jobs; + } + my @problem_statuses = map { [split ($;), @{$hash{$_}} ] } keys %hash; my @contest_statuses = map {