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 {