Add "SET search_path" command in dbinit
[gruntmaster-data.git] / lib / Gruntmaster / Data.pm
index c6b6f6f2097207bac5057593c9226c6f25e4bbda..7b90c872df7d2717aee7261f99e3e84b417e79c2 100644 (file)
@@ -47,6 +47,7 @@ sub db () { $db }
 sub dbinit {
        $db = DBIx::Simple->new(@_);
        $db->keep_statements = 100;
+       $db->dbh->do('SET search_path TO gruntmaster, public');
 };
 
 sub purge;
@@ -192,7 +193,10 @@ sub standings {
                $opens{$problem, $owner} = $time;
        }
 
-       my $jobs = $db->select('job_entry', '*', {contest => $ct->{id}}, 'id');
+       # result IS NULL if job was never run
+       # result = -2 if job is being rerun
+       my %where = (contest => $ct->{id}, result => {'>=', 0});
+       my $jobs = $db->select('job_entry', '*', \%where, 'id');
 
        while (my $job = $jobs->hash) {
                my $open = $opens{$job->{problem}, $job->{owner}} // $ct->{start};
This page took 0.010558 seconds and 4 git commands to generate.