diff --git a/src/Hydra/lib/Hydra/Schema.pm b/src/Hydra/lib/Hydra/Schema.pm index 67f4f5ba..f345f22a 100644 --- a/src/Hydra/lib/Hydra/Schema.pm +++ b/src/Hydra/lib/Hydra/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TBu7KS/p71rCVTI6cl7Thw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E0tjF/wARKGxMml3bYcLFQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildinputs.pm b/src/Hydra/lib/Hydra/Schema/Buildinputs.pm index 6309293c..2fe7fa50 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildinputs.pm @@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); __PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z/kUflLoTmq+0tM82kxVYw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ACPzMIxSYRMXkv8LGwR6lA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildproducts.pm b/src/Hydra/lib/Hydra/Schema/Buildproducts.pm index 115a698e..84149a38 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildproducts.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildproducts.pm @@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gmWXPz3CSN4WOUTrcxXzQw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lREoFKnRpeyIMd+9AxbYuQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm b/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm index bfe69346..0ee60082 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm @@ -29,8 +29,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7iNqQ1Q912X3/TiDPk/RWA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6wMlFDXyRr0ElqsdFbRc3g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Builds.pm b/src/Hydra/lib/Hydra/Schema/Builds.pm index e0c40be9..dfc08545 100644 --- a/src/Hydra/lib/Hydra/Schema/Builds.pm +++ b/src/Hydra/lib/Hydra/Schema/Builds.pm @@ -70,8 +70,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u9AGxpJIQFY0RAILvnaIKA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cX3mAlsEB9POMvmCcoWn6A __PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); diff --git a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm b/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm index a7a3571f..8f329601 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm @@ -23,8 +23,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cqaeltO0pjpVPv2Ah54SQg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O6bwijQ4R6Ke9QjYjsuUsA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildsteps.pm b/src/Hydra/lib/Hydra/Schema/Buildsteps.pm index 054db79d..bd6e430b 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildsteps.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildsteps.pm @@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dJac1j1n7A2sQBrfgdLdYg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7vdFywkKYZeLSow8AijaUA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm b/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm index cf14989e..5b848c0c 100644 --- a/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm @@ -22,8 +22,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("srcpath", "sha256hash"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5sHH9qbQ5WtUf2oRjXbwuw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dPQ2YTZIUdMRwBbiu1qwUw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm b/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm index bc15f163..3bda4b38 100644 --- a/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm +++ b/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm @@ -20,8 +20,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("uri", "revision"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k1xO/rt0fxTjvtkPY/Jwfw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EVNo1URK0XJTQo+KXHlmpA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm b/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm index 8f32fdd4..595428a9 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm @@ -22,6 +22,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 0, size => undef }, "tag", { data_type => "text", is_nullable => 0, size => undef }, + "boolean", + { data_type => "integer", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("project", "jobset", "input", "altnr"); __PACKAGE__->belongs_to( @@ -31,8 +33,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B8hAt4GezVJ1/uo4ZQ3Q2g +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eM2dwDI3lL5EHwUA5m2pDg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm b/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm index 2ae7dd6b..887d7eba 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4ev1n8miWroPWPRoQBc0cA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:poDHcgoqxtQf8HN7AbpnOA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsets.pm b/src/Hydra/lib/Hydra/Schema/Jobsets.pm index d932cf0e..a398a35a 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsets.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsets.pm @@ -22,6 +22,8 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, "errortime", { data_type => "integer", is_nullable => 0, size => undef }, + "lastcheckedtime", + { data_type => "integer", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("project", "name"); __PACKAGE__->has_many( @@ -48,8 +50,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7kRl30K427lecYirFGBxew +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BJwh19m9KHKZUMAiQ6fPAw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Projects.pm b/src/Hydra/lib/Hydra/Schema/Projects.pm index 7f6ed3c3..9ef871e7 100644 --- a/src/Hydra/lib/Hydra/Schema/Projects.pm +++ b/src/Hydra/lib/Hydra/Schema/Projects.pm @@ -30,8 +30,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZBkLod0Yw87pgQGAEuk7Zg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:v/jpJlVZg1k8PDLJyZhpSA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/programs/Scheduler.pl b/src/Hydra/programs/Scheduler.pl index b2b267a0..7901c4bf 100644 --- a/src/Hydra/programs/Scheduler.pl +++ b/src/Hydra/programs/Scheduler.pl @@ -338,6 +338,11 @@ sub checkJobAlternatives { sub checkJobSet { my ($project, $jobset) = @_; my $inputInfo = {}; + + $db->txn_do(sub { + $jobset->lastcheckedtime(time); + $jobset->update; + }); # Fetch the input containing the Nix expression. (my $exprInput) = $jobset->jobsetinputs->search({name => $jobset->nixexprinput}); diff --git a/src/Hydra/root/project.tt b/src/Hydra/root/project.tt index 7716232b..cb97a04d 100644 --- a/src/Hydra/root/project.tt +++ b/src/Hydra/root/project.tt @@ -92,6 +92,14 @@ [% INCLUDE maybeEditString param="jobset-$baseName-nixexprinput" value=jobset.nixexprinput extraClass="shortString" %] + [% IF !edit %] + + Last checked: + + [% PROCESS renderDateTime timestamp = jobset.lastcheckedtime %] + + + [% END %] [% IF !edit && jobset.errormsg %] Last evaluation error: diff --git a/src/hydra.sql b/src/hydra.sql index cd52eb9c..c68bbae9 100644 --- a/src/hydra.sql +++ b/src/hydra.sql @@ -37,6 +37,8 @@ create table BuildSchedulingInfo ( locker text not null default '', -- !!! hostname/pid of the process building this job? logfile text, -- if busy, the path of the logfile + + disabled integer not null default 0, -- true means hold this job until its re-enabled foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite ); @@ -63,6 +65,8 @@ create table BuildResultInfo ( logfile text, -- the path of the logfile releaseName text, -- e.g. "patchelf-0.5pre1234" + + keep integer not null default 0, -- true means never garbage-collect the build output foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite ); @@ -81,11 +85,11 @@ create table BuildSteps ( busy integer not null, - status integer, + status integer, -- 0 = success, 1 = failed errorMsg text, - startTime integer, -- in Unix time, 0 = used cached build result + startTime integer, stopTime integer, primary key (id, stepnr), @@ -174,6 +178,7 @@ create table Jobsets ( nixExprPath text not null, -- relative path of the Nix expression errorMsg text, -- used to signal the last evaluation error etc. for this jobset errorTime integer, -- timestamp associated with errorMsg + lastCheckedTime integer, -- last time the scheduler looked at this jobset primary key (project, name), foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite foreign key (project, name, nixExprInput) references JobsetInputs(project, job, name)