forked from lix-project/hydra
Drop the errorMsg column in the Jobs table
We're not using it anywhere.
This commit is contained in:
parent
f53e3c738d
commit
1c20cfdf24
|
@ -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;
|
||||
|
|
|
@ -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</jobs> -> 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 => [
|
||||
|
|
|
@ -166,7 +166,7 @@ __PACKAGE__->has_many(
|
|||
undef,
|
||||
);
|
||||
|
||||
=head2 jobsets
|
||||
=head2 jobsets_2s
|
||||
|
||||
Type: has_many
|
||||
|
||||
|
@ -175,7 +175,7 @@ Related object: L<Hydra::Schema::Jobsets>
|
|||
=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</jobs> -> jobset
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->many_to_many("jobsets", "jobs", "jobset");
|
||||
|
||||
=head2 usernames
|
||||
|
||||
Type: many_to_many
|
||||
|
@ -267,8 +277,8 @@ Composing rels: L</projectmembers> -> 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 => [
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
1
src/sql/upgrade-28.sql
Normal file
1
src/sql/upgrade-28.sql
Normal file
|
@ -0,0 +1 @@
|
|||
alter table Jobs drop column errorMsg;
|
Loading…
Reference in a new issue