diff --git a/src/lib/Hydra/Schema/Jobs.pm b/src/lib/Hydra/Schema/Jobs.pm index dcfa557e..883c1bee 100644 --- a/src/lib/Hydra/Schema/Jobs.pm +++ b/src/lib/Hydra/Schema/Jobs.pm @@ -52,11 +52,6 @@ __PACKAGE__->table("Jobs"); data_type: 'text' is_nullable: 0 -=head2 errormsg - - data_type: 'text' - is_nullable: 1 - =cut __PACKAGE__->add_columns( @@ -66,8 +61,6 @@ __PACKAGE__->add_columns( { data_type => "text", is_foreign_key => 1, is_nullable => 0 }, "name", { data_type => "text", is_nullable => 0 }, - "errormsg", - { data_type => "text", is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -157,7 +150,7 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uYKWjewvKBEAuK53u7vKuw +# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-09-29 19:41:42 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lnZSd0gDXgLk8WQeAFqByA 1; diff --git a/src/lib/Hydra/Schema/Jobsets.pm b/src/lib/Hydra/Schema/Jobsets.pm index f304f770..47342672 100644 --- a/src/lib/Hydra/Schema/Jobsets.pm +++ b/src/lib/Hydra/Schema/Jobsets.pm @@ -319,9 +319,19 @@ __PACKAGE__->has_many( undef, ); +=head2 projects -# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 23:13:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CO0aE+jrjB+UrwGRzWZLlw +Type: many_to_many + +Composing rels: L -> project + +=cut + +__PACKAGE__->many_to_many("projects", "jobs", "project"); + + +# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-09-29 19:41:42 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ln8UftPqK+aHCCrGkVxeyA my %hint = ( columns => [ diff --git a/src/lib/Hydra/Schema/Projects.pm b/src/lib/Hydra/Schema/Projects.pm index 9bf9dde3..c6cfc118 100644 --- a/src/lib/Hydra/Schema/Projects.pm +++ b/src/lib/Hydra/Schema/Projects.pm @@ -166,7 +166,7 @@ __PACKAGE__->has_many( undef, ); -=head2 jobsets +=head2 jobsets_2s Type: has_many @@ -175,7 +175,7 @@ Related object: L =cut __PACKAGE__->has_many( - "jobsets", + "jobsets_2s", "Hydra::Schema::Jobsets", { "foreign.project" => "self.name" }, undef, @@ -256,6 +256,16 @@ __PACKAGE__->has_many( undef, ); +=head2 jobsets + +Type: many_to_many + +Composing rels: L -> jobset + +=cut + +__PACKAGE__->many_to_many("jobsets", "jobs", "jobset"); + =head2 usernames Type: many_to_many @@ -267,8 +277,8 @@ Composing rels: L -> username __PACKAGE__->many_to_many("usernames", "projectmembers", "username"); -# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 23:13:08 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fkd9ruEoVSBGIktmAj4u4g +# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-09-29 19:41:42 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fTCp0shW7pisnCztza68xA my %hint = ( columns => [ diff --git a/src/script/hydra-evaluator b/src/script/hydra-evaluator index 8f83f03c..8f367e77 100755 --- a/src/script/hydra-evaluator +++ b/src/script/hydra-evaluator @@ -166,16 +166,6 @@ sub checkJobsetWrapped { checkBuild($db, $jobset, $inputInfo, $nixExprInput, $job, \%buildMap, $prevEval, $jobOutPathMap, $plugins); } - # Update the last checked times and error messages for each - # job. - my %failedJobNames; - push @{$failedJobNames{$_->{location}}}, $_->{msg} foreach @{$jobs->{error}}; - - $jobset->update({lastcheckedtime => time}); - - $_->update({ errormsg => $failedJobNames{$_->name} ? join '\n', @{$failedJobNames{$_->name}} : undef }) - foreach $jobset->jobs->all; - # Have any builds been added or removed since last time? my $jobsetChanged = (scalar(grep { $_->{new} } values(%buildMap)) > 0) @@ -249,6 +239,8 @@ sub checkJobsetWrapped { # If this is a one-shot jobset, disable it now. $jobset->update({ enabled => 0 }) if $jobset->enabled == 2; + + $jobset->update({ lastcheckedtime => time }); }); # Store the error messages for jobs that failed to evaluate. diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index fa3d89e4..7384ebcd 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -114,8 +114,6 @@ create table Jobs ( jobset text not null, name text not null, - errorMsg text, -- evalution error for this job - primary key (project, jobset, name), foreign key (project) references Projects(name) on delete cascade on update cascade, foreign key (project, jobset) references Jobsets(project, name) on delete cascade on update cascade diff --git a/src/sql/upgrade-28.sql b/src/sql/upgrade-28.sql new file mode 100644 index 00000000..b511a10e --- /dev/null +++ b/src/sql/upgrade-28.sql @@ -0,0 +1 @@ +alter table Jobs drop column errorMsg;